Home
Test
Readme
Download
JSXML XML Tools
Version 1.2
6/18/2001
Copyright © 2000-2001
Peter Tracey
A few months ago I started working on some XML tools with the goal of speed, simplicity, and minimal code. I ended up with a library of XML tools. A parser that doesn't mind if you throw 2000 lines of (well-formed) XML at it, a builder that invites the coding of GUIs (graphical user interfaces) around it, and an iterator that makes costly recursion unnecessary. I've released it under the LGPL (it's free for private and commercial use, no strings attached).
JSXML includes
REXML - a light-weight regular expression-based XML parser
Gives you programatic access to XML documents.
Mostly compliant with the
W3C's
XML 1.0 specification for non-validating XML parsers. However, when there was a choice between simplicity/performance/code size and following the specification, it doesn't follow the specification.
Integrates with the JSXMLBuilder and JSXMLIterator
The fastest JavaScript XML Parser available
REXML Lite - a stripped down version of REXML
Whitespace has been removed and internal variables renamed
No support for text, cdata, and pi elements (text is 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 linear interface to modify XML
Tree-structured APIs are not easy to program GUIs around, and the code can be a mess (one word: loopy). JSXML builder takes the tree structure from REXML and makes it accessbile from a flat interface. The childElement(index) and parentElement interfaces are still available, but there are many other ways to access and manipulate elements, making it very convenient to alter pieces of the XML from pieces of the GUI.
No support for text, cdata, and pi elements, but this may be added in a future release (text is accessible and writable through the text property of an element).
JSXMLIterator - a tool to iterate the tree structure of a REXML object without using recursion
Because it is based on regular expressions, REXML is extremely fast. Take a look at these comparisons (click the image to enlarge):
Figure 1:
Notice that at one point REXML is
faster
than MSXML, which is compiled code and only works in recent versions of Internet Explorer (REXML is cross-browser compatible).
Figure 2:
Xparse
(V .91)
XML For Script
(V .22)
For comments, a list of issues, or to submit an new issue see:
http://sourceforge.net/projects/jsxml/