version 1.35, 2008/12/16 18:56:01
|
version 1.38, 2010/02/17 11:28:22
|
|
|
const char* text; | const char* text; |
int nsType; // Only applies to START_TAG, EMPTY_TAG, and END_TAG | int nsType; // Only applies to START_TAG, EMPTY_TAG, and END_TAG |
const char* localName; // Only applies to START_TAG, EMPTY_TAG, and END_TAG | const char* localName; // Only applies to START_TAG, EMPTY_TAG, and END_TAG |
|
Uint32 textLen; // Only applies to CDATA and CONTENT |
|
|
Array<XmlAttribute> attributes; | Array<XmlAttribute> attributes; |
| |
void print() const; | void print() const; |
|
|
| |
// Warning: this constructor modifies the text. | // Warning: this constructor modifies the text. |
| |
XmlParser(char* text, XmlNamespace* ns = 0); |
/** If hideEmptyTags if true, next() hides empty tags from the caller. |
|
Instead, next() returns a fake start tag. The subsequent next() call |
|
returns a fake end tag. This relieves the caller from having to do |
|
special processing of empty tags, which can be tricky and error-prone. |
|
*/ |
|
XmlParser(char* text, XmlNamespace* ns = 0, Boolean hideEmptyTags = false); |
| |
/** Comments are returned with entry if includeComment is true else | /** Comments are returned with entry if includeComment is true else |
XmlParser ignores comments. Default is false. | XmlParser ignores comments. Default is false. |
|
|
| |
XmlNamespace* getNamespace(int nsType); | XmlNamespace* getNamespace(int nsType); |
| |
|
void setHideEmptyTags(bool flag) { _hideEmptyTags = flag; } |
|
|
|
bool getHideEmptyTags() const { return _hideEmptyTags; } |
|
|
private: | private: |
| |
|
Boolean _next(XmlEntry& entry, Boolean includeComment = false); |
|
|
Boolean _getElementName(char*& p, const char*& localName); | Boolean _getElementName(char*& p, const char*& localName); |
| |
Boolean _getOpenElementName( | Boolean _getOpenElementName( |
|
|
XmlNamespace* _supportedNamespaces; | XmlNamespace* _supportedNamespaces; |
Stack<XmlNamespace> _nameSpaces; | Stack<XmlNamespace> _nameSpaces; |
int _currentUnsupportedNSType; | int _currentUnsupportedNSType; |
|
Boolean _hideEmptyTags; |
}; | }; |
| |
PEGASUS_COMMON_LINKAGE void XmlAppendCString( | PEGASUS_COMMON_LINKAGE void XmlAppendCString( |