------------------------------------------------------------------------------
| 189 | |
| 190 | //------------------------------------------------------------------------------ |
| 191 | int vtkXMLParser::InitializeParser() |
| 192 | { |
| 193 | // Create the expat XML parser. |
| 194 | if (!this->CreateParser()) |
| 195 | { |
| 196 | vtkErrorMacro("Parser already initialized"); |
| 197 | this->ParseError = 1; |
| 198 | return 0; |
| 199 | } |
| 200 | |
| 201 | XML_SetElementHandler( |
| 202 | static_cast<XML_Parser>(this->Parser), &vtkXMLParserStartElement, &vtkXMLParserEndElement); |
| 203 | if (!this->IgnoreCharacterData) |
| 204 | { |
| 205 | XML_SetCharacterDataHandler( |
| 206 | static_cast<XML_Parser>(this->Parser), &vtkXMLParserCharacterDataHandler); |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser), nullptr); |
| 211 | } |
| 212 | XML_SetUserData(static_cast<XML_Parser>(this->Parser), this); |
| 213 | this->ParseError = 0; |
| 214 | return 1; |
| 215 | } |
| 216 | |
| 217 | //------------------------------------------------------------------------------ |
| 218 | int vtkXMLParser::ParseChunk(const char* inputString, unsigned int length) |
nothing calls this directly
no test coverage detected