Inheritance diagram for CP_XMLDocReader:
Public Member Functions | |
Constructor / Destructor | |
CP_XMLDocReader (CP_InStream *inOutStream, CP_XMLDocument *inXMLDocument) | |
Constructor. | |
virtual | ~CP_XMLDocReader () |
Destructor. | |
Parsing | |
virtual void | Parse (bool inUseOSNative=true) |
XML_Parser | GetParser () |
Protected Member Functions | |
Error Handling | |
virtual void | OnXMLParseError (SInt16 inLineNumber, SInt16 inXMLError) |
XML Elements | |
virtual void | OnStartElement (const XML_Char *inElement, CP_XMLAttributes &inAttributes) |
virtual void | OnEndElement (const XML_Char *inElement) |
virtual void | OnStartCData () |
virtual void | OnEndCData () |
virtual void | OnCharData (const XML_Char *s, SInt16 inLength) |
virtual void | OnProcessingInstruction (const XML_Char *inTarget, const XML_Char *inData) |
virtual void | OnComment (const XML_Char *inData) |
Protected Attributes | |
CP_XMLDocument * | fXMLDocument |
CP_InStream * | fInStream |
UInt32 | fMaxBufferSize |
XML_Parser | fParser |
std::stack< CP_XMLDocNode * > | fNodes |
bool | fProcessingCharData |
CP_String | fText |
Private Member Functions | |
Child Nodes | |
void | AddChildNodes (CFXMLTreeRef inTreeRef, CP_XMLDocNode *inParentNode) |
Static Private Member Functions | |
Parser Callbacks | |
static void | StartElement_callback (void *inData, const XML_Char *inElement, const XML_Char **inAttributes) |
static void | EndElement_callback (void *inData, const XML_Char *inElement) |
static void | StartCData_callback (void *inData) |
static void | EndCData_callback (void *inData) |
static void | CharData_callback (void *inData, const XML_Char *s, int inLength) |
static void | ProcessingInstruction_callback (void *inUserData, const XML_Char *inTarget, const XML_Char *inData) |
static void | Comment_callback (void *inUserData, const XML_Char *inData) |
|
Constructor.
|
|
Destructor.
|
|
Sets up an XML parser object to handle the parsing of the xml data contained in the stream object supplied to this class.
|
|
Returns the XML_Parser object used in parsing this document.
|
|
Called when the xml parser encounters some type of error in parsing the XML code.
|
|
Called when the xml parser encounters a new element. This will create and add a new CP_XMLDocNode to the current node and make it a child of that node. Then any attributes will be set for this new node.
|
|
Called when an end element is encountered. This will call the current CP_M_XMLHandler object, if that object returns true, then that handler is removed from the stack, and the previous handler becomes the current one.
|
|
Called when the beginning of a CData section is encountered.
|
|
Called when the end of a CData section is encountered.
|
|
Called when char data is encountered. This will add the data to the string that is keeping track of the char data as it is encountered for an element. This may be called several times for char data for a particular element, as the data may be coming in sections.
|
|
Called when a processing instruction is encountered. Subclasses need to override to handle.
|
|
Called when a comment section is encountered. Subclasses need to override to handle.
|
|
Callback used to communicate between the expat parser and this class for the StartElement section. This calls the xml readers OnStartElement to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class for the EndElement section. This calls the xml readers OnEndElement to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class for the beginning of a CData section. This calls the xml readers OnStartCData to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class for the end of a CData section. This calls the xml readers OnEndCData to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class char data is encountered. This calls the xml readers OnCharData to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class when a processing instruction is encountered. This calls the xml readers OnProcessingInstruction to handle the actual processing of data.
|
|
Callback used to communicate between the expat parser and this class when a comment is encountered. This calls the xml readers OnComment to handle the actual processing of data.
|
|
The accumulated character data for this node. |
|
|
|
The CP_CP_XMLDocument that we are sending data to. |
|
The CP_InStream containing the XML data. |
|
Maximum size of the data we read each time. |
|
The XML parser object used to parse our data. |
|
Stack of nodes read in. |
|
Flag to indicate if we are currently processing character data. |