The C VOTable Parser Library.

[Introduction]- [Download]- [Tutorial]- [Reference]

Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

Jump to a VOTABLE tag


Functions

int Move_to_Next_VO_Fields (xmlTextReaderPtr reader)
 Move reader to the first FIELD tag contained in the next TABLE tag
PURPOSE : Try to move to the first FIELD tag embedded in the next TABLE tag.

int Move_to_Next_VO_Table (xmlTextReaderPtr reader)
 Try to move to the next TABLE tag
PURPOSE : Try to move to the next TABLE tag.


Detailed Description

Functions to jump to a VOTABLE tag

Function Documentation

int Move_to_Next_VO_Fields xmlTextReaderPtr  reader  ) 
 

Move reader to the first FIELD tag contained in the next TABLE tag
PURPOSE : Try to move to the first FIELD tag embedded in the next TABLE tag.

Parameters:
reader Pointer on xmlTextReader
Exceptions:
RETURN_ERROR can't move to the next TABLE tag
Move reader to the end of file
Returns:
RETURN_OK Move reader to the first FIELD tag of the next TABLE tag

00113                                                      {
00114 
00115   int ret;
00116   xmlChar *name;
00117   
00118   ret = 1;
00119 
00120   /* Reading file */
00121   ret = xmlTextReaderRead(reader);
00122   while (ret == 1) {
00123     name = xmlTextReaderName(reader);
00124     /* Searching FIELD tag */
00125     if (xmlStrcmp(name,"FIELD") == 0 
00126         && xmlTextReaderNodeType(reader) == 1) {
00127       xmlFree(name);
00128       return(RETURN_OK);  
00129     } else {
00130       ret = xmlTextReaderRead(reader);
00131       if (name!=NULL)
00132         xmlFree(name);
00133     }
00134 
00135   }
00136   return(RETURN_ERROR);
00137 }

int Move_to_Next_VO_Table xmlTextReaderPtr  reader  ) 
 

Try to move to the next TABLE tag
PURPOSE : Try to move to the next TABLE tag.

Parameters:
reader Pointer on xmlTextReader
Exceptions:
RETURN_ERROR can't move to the first FIELD embedded in the next TABLE element
Move reader to the end of file
Returns:
RETURN_OK Move reader to the next TABLE tag

00141                                                     {
00142 
00143   int ret;
00144   xmlChar *name;
00145 
00146   ret = 1;
00147   /* Reading file */
00148   ret = xmlTextReaderRead(reader);
00149   while (ret == 1) {
00150     name = xmlTextReaderName(reader);
00151     /* Searching TABLE tag */
00152     if (xmlStrcmp(name,"TABLE") == 0 
00153         && xmlTextReaderNodeType(reader) == 1) {
00154       xmlFree(name);
00155       return(RETURN_OK);
00156     }
00157     else {
00158       ret = xmlTextReaderRead(reader);
00159       if (name!=NULL)
00160         xmlFree(name);
00161     }
00162   }
00163   return(RETURN_ERROR);
00164 }