#include <expat.h>
Go to the source code of this file.
Data Structures | |
| struct | AttrList |
| Information for an attribute. More... | |
| struct | AttrBlock |
| Information for a block of attributes. More... | |
| struct | elem_t |
| struct | node |
| struct | Stack |
| This is a structure that holds the information for a stack. More... | |
Defines | |
| #define | VOT_DOC_VERSION "1.2" |
| #define | VOT_XSI "http://www.w3.org/2001/XMLSchema-instance" |
| #define | VOT_SCHEMA_LOC "http://www.ivoa.net/xml/VOTable/v1.1 http://www.ivoa.net/xml/VOTable/v1.1" |
| #define | VOT_XMLNS "http://www.ivoa.net/xml/VOTable/v1.1" |
| #define | SZ_ATTRNAME 32 |
| #define | SZ_ATTRVAL 2048 |
| #define | SZ_FNAME 255 |
| #define | SZ_XMLTAG 1024 |
| #define | SZ_LINE 4096 |
| #define | MAX_ATTR 100 |
| #define | HANDLE_INCREMENT 1024000 |
| #define | min(a, b) ((a<b)?a:b) |
| #define | max(a, b) ((a>b)?a:b) |
| #define | handle_t int |
| Handle type definition. | |
Typedefs | |
| typedef struct elem_t | Element |
| typedef struct node | Node |
Functions | |
| int | vot_attrSet (AttrBlock *ablock, char *name, char *value) |
| Set/Create an attributes (private method). | |
| char * | vot_attrGet (AttrBlock *ablock, char *name) |
| Get an attribute's value (private method). | |
| char * | vot_attrXML (AttrBlock *ablock) |
| Get the attributes for an XML tag (private method). | |
| int | vot_eType (char *name) |
| Get the integer value (ID) of the name (private method). | |
| char * | vot_elemName (Element *e) |
| Get the name of the Element (private method). | |
| int | vot_elemType (Element *e) |
| Get the integer value (ID) of the Element (private method). | |
| char * | vot_elemXML (Element *e) |
| Builds a string of the opening XML Tag (private method). | |
| char * | vot_elemXMLEnd (Element *e) |
| Build a string of the ending XML Tag (private method). | |
| Element * | vot_newElem (unsigned int type) |
| Allocate a new structure of the given type (private method). | |
| handle_t | vot_setHandle (Element *elem) |
| Assign the Element a handle_t (private method). | |
| handle_t | vot_lookupHandle (Element *elem) |
| Lookup the handle_t to an Element (private method). | |
| void | vot_freeHandle (handle_t handle) |
| Free a handle for use (private method). | |
| Element * | vot_getElement (handle_t handle) |
| Get the Element refered to by handle_t (private method). | |
| void | vot_newHandleTable (void) |
| Initialize a handle table (private method). | |
| int | vot_handleCount (void) |
| Get the number of handle_t used (private method). | |
| void | vot_handleCleanup (void) |
| Free all the handle nodes (private method). | |
| void | vot_handleError (char *msg) |
| Print an error message. | |
| void | vot_endElement (void *userData, const char *name) |
| CB whenever an end tag is seen (private method). | |
| void | vot_startElement (void *userData, const char *name, const char **atts) |
| CB whenever a start tag is seen (private method). | |
| void | vot_charData (void *userData, const XML_Char *s, int len) |
| Handle non-element character strings (private method). | |
| void | vot_startCData (void *userData) |
| Handle the start of CDATA strings (private method). | |
| void | vot_endCData (void *userData) |
| Handle the end of CDATA strings (private method). | |
| void | votPush (Stack *st, Element *elem) |
| Push a Node to the top of the stack (private method). | |
| Element * | votPop (Stack *st) |
| Return a Node from the top of the stack (private method). | |
| Element * | votPeek (Stack *st) |
| Peek at Element on top of the Stack (private method). | |
| Stack * | vot_newStack (void) |
| Makes a new stack (private method). | |
| int | vot_isEmpty (Stack *st) |
| Checks to see if the stack is empty (private method). | |
| void | vot_clearStack (Stack *st) |
| Clear the stack (private method). | |
| void | vot_printStack (Stack *st) |
| Print the name of all the stack elements (private method). | |
VOTPARSEP.H -- Internal LIBVOTABLE definitions.
| char* vot_attrGet | ( | AttrBlock * | ablock, | |
| char * | name | |||
| ) |
Get an attribute's value (private method).
vot_attrGet -- Get an attribute's value (private method).
| *ablock | An AttrBlock to insert these attributes | |
| *name | A string that hold the name of an attribute |
| int vot_attrSet | ( | AttrBlock * | ablock, | |
| char * | name, | |||
| char * | value | |||
| ) |
Set/Create an attributes (private method).
***************************************************************************
Public Internal Methods. The procedures are used to implement the library, however are not part of the public interface.
vot_attrSet -- Set/Create an attributes (private method).
| ablock | An AttrBlock to insert these attributes. | |
| name | A string that hold the name of an attribute. | |
| value | A string that hold the value of an attribute. |
| char* vot_attrXML | ( | AttrBlock * | ablock | ) |
Get the attributes for an XML tag (private method).
vot_attrXML -- Get the attributes for an XML tag (private method).
| *ablock | An AttrBlock to insert these attributes |
| void vot_charData | ( | void * | user, | |
| const XML_Char * | s, | |||
| int | len | |||
| ) |
Handle non-element character strings (private method).
vot_charData -- Handle non-element character strings (private method)
| user | User data (not used) | |
| s | content string | |
| len | length of string |
| vot_clearStack | ( | Stack * | st | ) |
Clear the stack (private method).
vot_clearStack -- Clear the stack (private method)
| st | A pointer to a Stack |
| char* vot_elemName | ( | Element * | e | ) |
| int vot_elemType | ( | Element * | e | ) |
| char* vot_elemXML | ( | Element * | e | ) |
Builds a string of the opening XML Tag (private method).
vot_elemXML -- Builds a string of the opening XML Tag (private method)
| *e | A pointer to an Element |
| char* vot_elemXMLEnd | ( | Element * | e | ) |
Build a string of the ending XML Tag (private method).
vot_elemXMLEnd -- Build a string of the ending XML Tag (private method)
| *e | A pointer to an Element |
| void vot_endCData | ( | void * | user | ) |
Handle the end of CDATA strings (private method).
vot_endCData -- Handle the end of CDATA strings (private method)
| user | User data (not used) |
| void vot_endElement | ( | void * | user, | |
| const char * | name | |||
| ) |
CB whenever an end tag is seen (private method).
vot_endElement -- CB whenever an end tag is seen (private method)
| user | User data (not used) | |
| name | The name in the XML tag |
| int vot_eType | ( | char * | name | ) |
Get the integer value (ID) of the name (private method).
vot_eType -- Get the integer value (ID) of the name (private method).
| name | Name of the desired type |
| void vot_freeHandle | ( | handle_t | handle | ) |
Free a handle for use (private method).
vot_freeHandle -- Free a handle for use (private method)
| handle | A handle_t to the Element you wish to free |
| Element* vot_getElement | ( | handle_t | handle | ) |
| void vot_handleCleanup | ( | void | ) |
Free all the handle nodes (private method).
vot_handleCleanup -- Free all the handle nodes (private method)
| int vot_handleCount | ( | void | ) |
Get the number of handle_t used (private method).
count of current used handles vot_handleCount -- Get the number of handle_t used (private method)
| void vot_handleError | ( | char * | msg | ) |
Print an error message.
vot_handleError -- Print an error message.
| int vot_isEmpty | ( | Stack * | st | ) |
Checks to see if the stack is empty (private method).
vot_isEmpty -- Checks to see if the stack is empty (private method)
| st | A pointer to a Stack |
| handle_t vot_lookupHandle | ( | Element * | elem | ) |
| Element* vot_newElem | ( | unsigned int | type | ) |
| void vot_newHandleTable | ( | void | ) |
Initialize a handle table (private method).
vot_newHandleTable -- Initialize a handle table (private method)
| Stack * vot_newStack | ( | void | ) |
Makes a new stack (private method).
vot_newStack -- Makes a new stack (private method)
| vot_printStack | ( | Stack * | st | ) |
Print the name of all the stack elements (private method).
vot_printStack -- Print the name of all the stack elements (private method)
| st | A pointer to a Stack |
| handle_t vot_setHandle | ( | Element * | elem | ) |
| void vot_startCData | ( | void * | user | ) |
Handle the start of CDATA strings (private method).
vot_startCData -- Handle the start of CDATA strings (private method)
| user | User data (not used) |
| void vot_startElement | ( | void * | user, | |
| const char * | name, | |||
| const char ** | atts | |||
| ) |
CB whenever a start tag is seen (private method).
vot_startElement -- CB whenever a start tag is seen (private method)
| user | User data (not used) | |
| name | The name in the XML tag. | |
| atts | An array of attributes. |
1.5.9