Helping ordinary people create extraordinary websites!
Scripts Directory XML Scripts Parsers

JSXML XML Tools

JSXML includes REXML, a high-performance parser that doesn't mind if you throw 2000 lines of (well-formed) XML at it, a builder with a unique API that invites the coding of GUIs (graphical user interfaces) around it, and an iterator that makes costly recursion unnecessary. It was released under the LGPL (it's free for private and commercial use, no strings attached) and has been downloaded over 300 times.



JSXML includes

  • REXML - a light-weight regular expression-based XML parser

    • Gives you programatic access to XML documents.
    • 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 - 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

Because it is based on regular expressions and uses efficient JavaScript code, REXML is extremely fast. Take a look at these comparisons (click the image to enlarge):

Author: Level Three Solutions   Version: 1.2
Price: Free (LGPL)   Demo: n/a
Platform(s): All   Download Script: Click here
 22 Votes

More XML Parsers Scripts:

Leave a Comment on "JSXML XML Tools"
You must be logged in to post a comment.

Link to This Script!


GET OUR NEWSLETTERS