* 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 */
| 2018 | * nodes to read, or -1 in case of error |
| 2019 | */ |
| 2020 | int |
| 2021 | xmlTextReaderNextSibling(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 | * * |
nothing calls this directly
no test coverage detected