* xmlTextReaderMoveToFirstAttribute: * @reader: the xmlTextReaderPtr used * * Moves the position of the current instance to the first attribute * associated with the current node. * * Returns 1 in case of success, -1 in case of error, 0 if not found */
| 2792 | * Returns 1 in case of success, -1 in case of error, 0 if not found |
| 2793 | */ |
| 2794 | int |
| 2795 | xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader) { |
| 2796 | if (reader == NULL) |
| 2797 | return(-1); |
| 2798 | if (reader->node == NULL) |
| 2799 | return(-1); |
| 2800 | if (reader->node->type != XML_ELEMENT_NODE) |
| 2801 | return(0); |
| 2802 | |
| 2803 | if (reader->node->nsDef != NULL) { |
| 2804 | reader->curnode = (xmlNodePtr) reader->node->nsDef; |
| 2805 | return(1); |
| 2806 | } |
| 2807 | if (reader->node->properties != NULL) { |
| 2808 | reader->curnode = (xmlNodePtr) reader->node->properties; |
| 2809 | return(1); |
| 2810 | } |
| 2811 | return(0); |
| 2812 | } |
| 2813 | |
| 2814 | /** |
| 2815 | * xmlTextReaderMoveToNextAttribute: |
no outgoing calls
no test coverage detected