| 72 | // ================================================================================================= |
| 73 | |
| 74 | ExpatAdapter::ExpatAdapter() : parser(0) |
| 75 | { |
| 76 | |
| 77 | #if XMP_DebugBuild |
| 78 | this->elemNesting = 0; |
| 79 | #if DumpXMLParseEvents |
| 80 | if ( this->parseLog == 0 ) this->parseLog = stdout; |
| 81 | #endif |
| 82 | #endif |
| 83 | |
| 84 | this->parser = XML_ParserCreateNS ( 0, FullNameSeparator ); |
| 85 | if ( this->parser == 0 ) XMP_Throw ( "Failure creating Expat parser", kXMPErr_ExternalFailure ); |
| 86 | |
| 87 | XML_SetUserData ( this->parser, this ); |
| 88 | |
| 89 | XML_SetNamespaceDeclHandler ( this->parser, StartNamespaceDeclHandler, EndNamespaceDeclHandler ); |
| 90 | XML_SetElementHandler ( this->parser, StartElementHandler, EndElementHandler ); |
| 91 | |
| 92 | XML_SetCharacterDataHandler ( this->parser, CharacterDataHandler ); |
| 93 | XML_SetCdataSectionHandler ( this->parser, StartCdataSectionHandler, EndCdataSectionHandler ); |
| 94 | |
| 95 | XML_SetProcessingInstructionHandler ( this->parser, ProcessingInstructionHandler ); |
| 96 | XML_SetCommentHandler ( this->parser, CommentHandler ); |
| 97 | |
| 98 | #if BanAllEntityUsage |
| 99 | XML_SetStartDoctypeDeclHandler ( this->parser, StartDoctypeDeclHandler ); |
| 100 | isAborted = false; |
| 101 | #endif |
| 102 | |
| 103 | this->parseStack.push_back ( &this->tree ); // Push the XML root node. |
| 104 | |
| 105 | } // ExpatAdapter::ExpatAdapter |
| 106 | |
| 107 | // ================================================================================================= |
| 108 |
nothing calls this directly
no outgoing calls
no test coverage detected