The XML parser uses a callback mechanism to parse an XML
configuration file. The callback function receives the
complete tree and uses macros to parse it. The macros
perform a recursive call to the callback function to walk
through the tree
The format of the callback function using these macros is:
int raePLUG_PARSER(raeXML_PARM)
{
GET_NEXT_ELEMENT;
IF_ELEMENT("Element_name")
{
WHILE_ATTR_LIST
{
IF_ATTR("Attribute")
{
GET_ATTR(attr_value);
{
Process attr_value ...
}
}
}
GET_DATA(data_value);
Process data_value ...
}
GET_NEXT_NODE(status);
}
|