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

Function xmlTextReaderNext

ThirdParty/libxml2/vtklibxml2/xmlreader.c:1589–1611  ·  view source on GitHub ↗

* xmlTextReaderNext: * @reader: the xmlTextReaderPtr used * * Skip to the node following the current one in document order while * avoiding the subtree if any. * * Returns 1 if the node was read successfully, 0 if there is no more * nodes to read, or -1 in case of error */

Source from the content-addressed store, hash-verified

1587 * nodes to read, or -1 in case of error
1588 */
1589int
1590xmlTextReaderNext(xmlTextReaderPtr reader) {
1591 int ret;
1592 xmlNodePtr cur;
1593
1594 if (reader == NULL)
1595 return(-1);
1596 if (reader->doc != NULL)
1597 return(xmlTextReaderNextTree(reader));
1598 cur = reader->node;
1599 if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE))
1600 return(xmlTextReaderRead(reader));
1601 if (reader->state == XML_TEXTREADER_END || reader->state == XML_TEXTREADER_BACKTRACK)
1602 return(xmlTextReaderRead(reader));
1603 if (cur->extra & NODE_IS_EMPTY)
1604 return(xmlTextReaderRead(reader));
1605 do {
1606 ret = xmlTextReaderRead(reader);
1607 if (ret != 1)
1608 return(ret);
1609 } while (reader->node != cur);
1610 return(xmlTextReaderRead(reader));
1611}
1612
1613#ifdef LIBXML_WRITER_ENABLED
1614static void

Callers

nothing calls this directly

Calls 2

xmlTextReaderNextTreeFunction · 0.85
xmlTextReaderReadFunction · 0.85

Tested by

no test coverage detected