NQXML


Table of Contents
Introduction
Dependencies
Installation
How To Use
Limitations
Resources
Bugs
Copying
Warranty

Introduction

NQXML is a pure Ruby implementation of a non-validating XML processor. It includes an XML tokenizer, a SAX-style streaming XML parser, a DOM-style tree parser, an XML writer, and a context-sensitive callback mechanism. ``NQ'' stands for ``Not Quite''. Please read the Limitations section below.

NQXML started as an exercise: write a pure-Ruby parser. The code is simple, yet is good enough to read and write most XML documents.

NQXML's parsers are non-validating. In addition, they may never fully conform to the XML, SAX, or DOM specifications. Instead, NQXML tries to do things ``the Ruby way''; for example it uses iterators instead of callbacks to return XML entities. NQXML may never support external entities. (Note that it doesn't have to support external entities, since non-validating parsers are not required to do so.) If you require a robust, fully compliant XML parser, I suggest you use expat or XMLParser (see Resources below).

Ruby is an object-oriented scripting language by Yukihiro Matsumoto. The official Ruby Web site contains information and pointers to resources for this wonderful language.

For pointers to information about Ruby, XML, SAX, DOM, and more, see the Resources section below.

NQXML is developed and maintained by Jim Menard (). The latest version of NQXML can be found on the official NQXML Web page.

Recent Changes

Changes in version 1.1.3:

  • New ExternalID, SystemExternalID, and PublicExternalID classes.

  • Doctype and EntityTag objects now holds an ExternalID object instead of a string.

  • Element, Attlist, and Notation classes are no longer subclasses of EntityTag due to the changes mentioned previously. Instead, they are subclasses of NamedEntity. The remaining args for these three are stored in a new string attribute named argString until they are implemented correctly.

  • New test script oasis.rb runs NQXML over the OASIS test XML files. It reports conformance and, with the -v flag, outputs error traces for each error. (OASIS files not included.)

Older Versions

Warning

I plan to start removing from the NQXML Web page older release versions in order to save disk space. When I do so, the older versions will be gone forever; there is no other code repository for NQXML. Please let me know if you object.

Jonathan Conway has kindly started to mirror the NQXML .tar.gz files at http://www.ugcs.caltech.edu/~rise/nqxml-mirror/.