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

Function xmlTextReaderDepth

ThirdParty/libxml2/vtklibxml2/xmlreader.c:3485–3499  ·  view source on GitHub ↗

* xmlTextReaderDepth: * @reader: the xmlTextReaderPtr used * * The depth of the node in the tree. * * Returns the depth or -1 in case of error */

Source from the content-addressed store, hash-verified

3483 * Returns the depth or -1 in case of error
3484 */
3485int
3486xmlTextReaderDepth(xmlTextReaderPtr reader) {
3487 if (reader == NULL)
3488 return(-1);
3489 if (reader->node == NULL)
3490 return(0);
3491
3492 if (reader->curnode != NULL) {
3493 if ((reader->curnode->type == XML_ATTRIBUTE_NODE) ||
3494 (reader->curnode->type == XML_NAMESPACE_DECL))
3495 return(reader->depth + 1);
3496 return(reader->depth + 2);
3497 }
3498 return(reader->depth);
3499}
3500
3501/**
3502 * xmlTextReaderHasAttributes:

Callers 3

processNodeFunction · 0.85
xmlSchemaVReaderWalkFunction · 0.85
processNodeFunction · 0.85

Calls

no outgoing calls

Tested by 1

processNodeFunction · 0.68