HyperWorks Tools

::hwat::xml::RegisterCallback

::hwat::xml::RegisterCallback

Previous topic Next topic No expanding text in this topic  

::hwat::xml::RegisterCallback

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME

::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

1 if successful, "{}" otherwise.

 

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.

 

See also

xml Functions