Files | |
file | wdxml.h |
XML Accessors interface declarations. | |
Compounds | |
struct | XMLValidMsg |
Validation error and warning messages. More... | |
Functions | |
WDError | XMLInit () |
Init function. More... | |
WDError | XMLCleanup () |
Cleanup function. More... | |
WDError | XMLParseFile (const char *iFileName, void **oRoot) |
File Parser. More... | |
WDError | XMLNewDocument (const char *iRootTag, const char *iDTD, void **oRoot) |
Makes a new XML tree. More... | |
WDError | XMLDeleteTree (void *iRoot) |
Deletes a parsed tree. More... | |
WDError | XMLValidate (void *iRoot, int *oValid, XMLValidMsg *oMsg) |
Validates a parsed tree. More... | |
WDError | XMLDumpTree (const char *iFileName, void *iRoot) |
Dumps a tree to a file. More... | |
WDError | XMLGetTagName (void *iTag, char *oNameBuffer, int iMaxNameSize) |
Gets the name of a tag. More... | |
WDError | XMLGetNbrChildren (void *iTag, int *oNbr) |
Get the number of children. More... | |
WDError | XMLGetNthChild (void *iTag, int iN, void **oChild) |
Gets the nth children of a tag. More... | |
WDError | XMLGetParent (void *iTag, void **oParent) |
Returns the parent tag. More... | |
WDError | XMLGetNbrAttributes (void *iTag, int *oNbr) |
Gets the number of attributes. More... | |
WDError | XMLGetNthAttribute (void *iTag, int iN, void **oAttr) |
Gets the nth attribute of a tag. More... | |
WDError | XMLGetAttributeName (void *iAttr, char *oNameBuffer, int iMaxNameSize) |
Gets the name of an attribute. More... | |
WDError | XMLSetAttributeValue (void *iTag, const char *iName, const char *iValue) |
Sets the value of some attribute. More... | |
WDError | XMLGetAttributeValue (void *iTag, const char *iAttr, char *oVal, int iMaxLength) |
Finds an attribute's value. More... | |
WDError | XMLFindAttribute (void *iTag, const char *iAttr, void **oAttr) |
Finds an attribute. More... | |
WDError | XMLFindChild (void *iTag, const char *iName, const char *iID, void **oChild) |
Finds a tag from its ID. More... | |
WDError | XMLInterchangeTags (void *iTag1, void *iTag2) |
Interchanges two tags. More... | |
WDError | XMLMoveTagBefore (void *iTag, void *iDest) |
Moves a tag before another one. More... | |
WDError | XMLMoveTagAfter (void *iTag, void *iDest) |
Moves a tag after another one. More... | |
WDError | XMLGetNextTag (void *iTag, void **iNext) |
Gets the next sibling of a tag. More... | |
WDError | XMLGetPrevTag (void *iTag, void **iPrev) |
Gets the previous sibling of a tag. More... | |
WDError | XMLGetFirstChildren (void *iTag, void **iChild) |
Gets the first children. More... | |
WDError | XMLNewTag (void *iParent, const char *iName, void **oNewTag) |
Creates a new tag. More... | |
WDError | XMLSetTagName (void *iTag, const char *iName) |
Sets the tag name. More... | |
WDError | XMLRemoveTag (void *iTag) |
Removes a tag. More... | |
WDError | XMLNewAttribute (void *iTag, const char *iName, const char *iVal, void **oAttr) |
Creates a new attribute. More... | |
WDError | XMLRemoveAttribute (void *iAttr) |
Removes an attribute. More... | |
WDError | XMLFindChildRecur (void *iTag, const char *iID, void **oChild) |
Finds a tag from its ID (recursive). More... | |
WDError | XMLUnlinkTag (void *iTag) |
Unlinks a tag. More... | |
WDError | XMLVerifyRefs (void *iTag, const char *iRefFrom, const char *iRefTo, void **oErrorTag) |
Verifies XML references. More... |
Those functions are used to parse, validate and generate to a file some XML data from disk. The interface is totally independant of the library used to handle the XML; this module is simply a proxy to the chosen XML library.
void*
to refer to parsed tags or attributes. NO validation of any kind is made on the contents of the pointers before they are used (though the NULL
value is detected). The behavior of those functions are undefined if the pointers point to unexpected contents.
|
Cleanup function.
Cleans up the parser. DOES NOT delete the parsed tree. Use
You should be able to call
|
|
Deletes a parsed tree.
Deletes a tree rooted at
|
|
Dumps a tree to a file.
This function saves a parsed XML tree (with
|
|
Finds an attribute.
This function finds an attribute with the name
|
|
Finds a tag from its ID.
Finds a child given the ID and tag name, looking at the children of
|
|
Finds a tag from its ID (recursive).
This function is similar to
|
|
Gets the name of an attribute.
This function copies the name of the attribute
|
|
Finds an attribute's value.
This function finds the attribute with the name
|
|
Gets the first children.
This function gets the first children of the tag
|
|
Gets the number of attributes.
This functions returns the number of attributes of a tag.
|
|
Get the number of children.
This function returns the number of children a tag has.
|
|
Gets the next sibling of a tag.
This function gets the next sibling of tag
|
|
Gets the nth attribute of a tag.
This function returns the nth attribute, the first attribute being attribute
|
|
Gets the nth children of a tag.
This function returns the nth children, the first children being children
|
|
Returns the parent tag.
This function returns the parent tag of
|
|
Gets the previous sibling of a tag.
This function gets the previous sibling of tag
|
|
Gets the name of a tag.
This function copies the name of the tag
|
|
Init function.
Initializes the XML parser/validator/generator. Call this when the program opens.
|
|
Interchanges two tags.
Interchanges the tags
|
|
Moves a tag after another one.
Moves the tag
|
|
Moves a tag before another one.
Moves the tag
|
|
Creates a new attribute.
This function creates a new attribute for tag
|
|
Makes a new XML tree.
This function creates a new XML tree with a root tag named
|
|
Creates a new tag.
This function creates a new tag with name
|
|
File Parser.
Parses a file from disk to memory. No validation is made.
|
|
Removes an attribute.
This function removes the attribute
|
|
Removes a tag.
This function removes the tag
|
|
Sets the value of some attribute.
This function sets the value of attribute
|
|
Sets the tag name.
Changes the name of the tag
|
|
Unlinks a tag.
Removes the tag \iTag from its document context. This removes the tag from the list of its parent's children and removes any information about its sibling and parent from the tag. To properly delete the tag, use
|
|
Validates a parsed tree.
This function validates a XML tree, rooted at
|
|
Verifies XML references.
This function verifies that all the XML This function recursively verifies all the tags.
|