::hwat::xml::RegisterCallback

Register a callback function for any element event.

Syntax

::hwat::xml::RegisterCallback str_functionName str_event str_elementName

Arguments

str_functionName
Name of the function to call when the element event is triggered.
str_event
The event that you wish the callback to be triggered for. Can be one of "xmlstart", "xmlbody", or "xmlclose".
str_elementName
Element name that this callback applies to.

Returns

Success
1
Failure
{}

Example

::hwat::xml::RegisterCallback ::mystuff::StartCallbackProc xmlstart table

Comments

It is suggested that all needed callbacks be registered before calling the XMLParse function.

The user defined callback functions will passed the following arguments (based on event type):

Xmlstart -> str_elementName str_attrList

Xmlbody -> str_elementName str_data

Xmlclose -> str_elementName

You must author your callback functions to receive these arguments.