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

Function xmlTextReaderNextSibling

ThirdParty/libxml2/vtklibxml2/xmlreader.c:2020–2042  ·  view source on GitHub ↗

* xmlTextReaderNextSibling: * @reader: the xmlTextReaderPtr used * * Skip to the node following the current one in document order while * avoiding the subtree if any. * Currently implemented only for Readers built on a document * * 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

2018 * nodes to read, or -1 in case of error
2019 */
2020int
2021xmlTextReaderNextSibling(xmlTextReaderPtr reader) {
2022 if (reader == NULL)
2023 return(-1);
2024 if (reader->doc == NULL) {
2025 /* TODO */
2026 return(-1);
2027 }
2028
2029 if (reader->state == XML_TEXTREADER_END)
2030 return(0);
2031
2032 if (reader->node == NULL)
2033 return(xmlTextReaderNextTree(reader));
2034
2035 if (reader->node->next != NULL) {
2036 reader->node = reader->node->next;
2037 reader->state = XML_TEXTREADER_START;
2038 return(1);
2039 }
2040
2041 return(0);
2042}
2043
2044/************************************************************************
2045 * *

Callers

nothing calls this directly

Calls 1

xmlTextReaderNextTreeFunction · 0.85

Tested by

no test coverage detected