JSXML is a library of XML tools. Originally written by Peter Tracey, it was released under the LGPL open-source license in July, 2001.
- REXML - a light-weight regular expression-based XML parser
- Gives you programatic access to XML documents.
- Integrates with the JSXMLBuilder and JSXMLIterator
- REXML Lite - a stripped down version of REXML
- Whitespace has been removed and internal variables renamed - file size is 1.9 KB!
- No support for text, cdata, and pi elements (however text is still accessible through the text property of an element).
- Text property of elements doesn't include text of that element's children
- Interchangable with REXML, as long as no unsupported functions are accessed
- JSXMLBuilder - a flat interface to modify XML
- JSXMLBuilder makes it easier to program GUIs that leverage the flexibility of XML
To tree or not to tree?
Most APIs for XML use a tree structure, which initially seems to be the right approach given that XML is itself tree-stuctured. However, anyone who has built a user interface which uses XML via MSXML or another tree-structured API knows as soon as there are several user actions that result in XML modifications, the code quickly become unmanageable. Therefore the JSXMLBuilder object takes the tree structure from REXML and makes it accessbile with a flat interface. The childElement and parentElement methods are still available, but there are many other ways to access and manipulate elements, making it very convenient to alter pieces of the XML directly from events in the GUI, without navigating through the API hunting for elements.
- Text is not stored as a child element, and there is no support for comment, cdata, and pi type elements. Text is accessed and writable through the text property of an element.
- JSXMLIterator - a tool to iterate the tree structure of a REXML object without using recursion