(file) Return to XmlParser.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlParser.cpp between version 1.54 and 1.55

version 1.54, 2009/02/05 05:44:04 version 1.55, 2009/11/30 16:49:46
Line 306 
Line 306 
 // //
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
 XmlParser::XmlParser(char* text, XmlNamespace* ns)  XmlParser::XmlParser(char* text, XmlNamespace* ns, Boolean hideEmptyTags)
     : _line(1),     : _line(1),
       _current(text),       _current(text),
       _restoreChar('\0'),       _restoreChar('\0'),
       _foundRoot(false),       _foundRoot(false),
       _supportedNamespaces(ns),       _supportedNamespaces(ns),
       // Start valid indexes with -2. -1 is reserved for not found.       // Start valid indexes with -2. -1 is reserved for not found.
       _currentUnsupportedNSType(-2)        _currentUnsupportedNSType(-2),
         _hideEmptyTags(hideEmptyTags)
 { {
 } }
  
Line 554 
Line 555 
     }     }
 } }
  
 Boolean XmlParser::next(  Boolean XmlParser::_next(
     XmlEntry& entry,     XmlEntry& entry,
     Boolean includeComment)     Boolean includeComment)
 { {
Line 728 
Line 729 
     return true;     return true;
 } }
  
   Boolean XmlParser::next(XmlEntry& entry, Boolean includeComment)
   {
       if (_hideEmptyTags)
       {
           // Get the next tag.
   
           if (!_next(entry, includeComment))
               return false;
   
           // If an EMPTY_TAG is encountered, then convert it to a START_TAG and
           // push a matching END_TAG on the put-back stack. This hides every
           // EMPTY_TAG from the caller.
   
           if (entry.type == XmlEntry::EMPTY_TAG)
           {
               entry.type = XmlEntry::START_TAG;
   
               XmlEntry tmp;
               tmp.type = XmlEntry::END_TAG;
               tmp.text = entry.text;
               tmp.nsType = entry.nsType;
               tmp.localName = entry.localName;
   
               _putBackStack.push(tmp);
           }
   
           return true;
       }
       else
           return _next(entry, includeComment);
   }
   
 // Get the namespace type of the given tag // Get the namespace type of the given tag
 int XmlParser::_getNamespaceType(const char* tag) int XmlParser::_getNamespaceType(const char* tag)
 { {


Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2