MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlReaderWalker

Function xmlReaderWalker

ThirdParty/libxml2/vtklibxml2/xmlreader.c:5098–5123  ·  view source on GitHub ↗

* xmlReaderWalker: * @doc: a preparsed document * * Create an xmltextReader for a preparsed document. * * Returns the new reader or NULL in case of error. */

Source from the content-addressed store, hash-verified

5096 * Returns the new reader or NULL in case of error.
5097 */
5098xmlTextReaderPtr
5099xmlReaderWalker(xmlDocPtr doc)
5100{
5101 xmlTextReaderPtr ret;
5102
5103 if (doc == NULL)
5104 return(NULL);
5105
5106 ret = xmlMalloc(sizeof(xmlTextReader));
5107 if (ret == NULL) {
5108 return(NULL);
5109 }
5110 memset(ret, 0, sizeof(xmlTextReader));
5111 ret->entNr = 0;
5112 ret->input = NULL;
5113 ret->mode = XML_TEXTREADER_MODE_INITIAL;
5114 ret->node = NULL;
5115 ret->curnode = NULL;
5116 ret->base = 0;
5117 ret->cur = 0;
5118 ret->allocs = XML_TEXTREADER_CTXT;
5119 ret->doc = doc;
5120 ret->state = XML_TEXTREADER_START;
5121 ret->dict = xmlDictCreate();
5122 return(ret);
5123}
5124
5125/**
5126 * xmlReaderForDoc:

Callers 3

walkDocFunction · 0.85
walkerParseTestFunction · 0.85
patternTestFunction · 0.85

Calls 1

xmlDictCreateFunction · 0.85

Tested by 2

walkerParseTestFunction · 0.68
patternTestFunction · 0.68