Xiqual 0.9.1

In file xitools/xmlhooks.c:

int xml_addtaghook

(xmldoc* doc, char* tagname, int* func)

Add a hook to handle a specific tag.

Documentation

Add a hook to handle a specific tag. This is probably the most interesting function in xixml. You can add a hook function to handle each tag in your datafiles with this function. The hook may also control the further parsing of the XML file, if you want to.

The hook will get a pointer to the xmltag structure as its first argument, and must return 0 if no special handling problems have occurred. At the moment, returning anything other than zero will cause xml_parse() to skip parsing of any children of this tag. This is to allow you to remove any children that aren't behaving, for instance.

(A future extension might allow for the return code to cause parsing to stop altogether)

Returns:
0 if no error occurred allocating a node to hold your function
Author:
Ronny Bangsund

Alphabetic index



This page was generated with the help of DOC++.