TOC PREV NEXT INDEX


Generated XML Decode Functions


The code generated to decode XML messages uses off-the-shelf XML parser software to parse the XML documents to be decoded. This software contains a common interface known as the Simple API for XML (or SAX) that is a de-facto standard that is supported by most parsers. XBinder generates an implementation of the content handler interface defined by this standard. This implementation receives the parsed XML data and uses it to populate the structures generated by the compiler.
The default XML parser used is the EXPAT parser (http://www.expat.org). This is a lightweight, open-source parser that was implemented in C. XBinder generates C SAX handler functions that are called from the SAX interface of this framework to decode XML data into the generated typed data structures. The interface was designed to be generic so that other XML parsers could be easily substituted. An interface to the GNOME LibXML2 parser (http://xmlsoft.org) is also available. Interfacing to other parsers requires only building an abstraction layer to map the common interface to the vendor's interface.
XBinder generates code to implement the following functions defined in the SAX content handler interface:
startElement

characters

endElement

The interface defines other methods that can be implemented as well, but these are sufficient to decode XML encoded data.

Copyright © Objective Systems 2002-2005
This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included.
  Objective Systems, Inc.
102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX