SXP Reference

Usage General


To work with SXP, the user needs to instantiate a SablotSituation, register a DOM handler (a set of DOM-like callback functions) using SXP_registerDOMHandler, and create a query context using SXP_createQueryContext.


     SablotSituation S;
     SXP_QueryContext Q;
     DOMHandler my_domhandler=
       /* ... more callbacks follow ... */
     /* let us say the root is 123 */
     SXP_Node root = (SXP_Node) 123;
     SXP_char *result;
     SXP_registerDOMHandler(S, &my_domhandler);
     SXP_createQueryContext(S, &Q);
     /* perform the query with the root as the context node */
     SXP_query(Q, "//*", root, 1, 1);
     SXP_getResultString(Q, &result);


For clarity, error checking has been omitted from the above excerpt.

See Also

Groups [ General ]
Entries [ SXP_createQueryContext | SXP_registerDOMHandler | SablotSituation ]

© 2001 Ginger Alliance
revision 01-12-12
This page was generated by APIDOC