echoxul.parser
Class XULBuilder

java.lang.Object
  extended byechoxul.parser.XULBuilder

public class XULBuilder
extends java.lang.Object

This class implements a SAX ContentHandler which is capable of converting a SAX event stream into an XULDocument.

Upon instantiation, an empty XULDocument will be created. The SAX DefaultHandler can be obtained with a call to getDefaultHandler(). Processing a SAX event stream through this DefaultHandler will result in a fully built XULDocument.

The processing is done in multiple states. Each state is represented by a different plugin ContentHandler which is swapped out behind the scenes. The states are given below:

Author:
Terry Laurenzo

Constructor Summary
XULBuilder(XOMFactory factory)
           
 
Method Summary
 org.xml.sax.helpers.DefaultHandler getDefaultHandler()
          Get the DefaultHandler to hook up to the SAX parser
 XULDocument getXULDocument()
          Get the XULDocument after parsing.
static java.util.Map piParser(java.lang.String data)
          Parse the data part of a processing instruction into name/value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XULBuilder

public XULBuilder(XOMFactory factory)
Method Detail

getXULDocument

public XULDocument getXULDocument()
Get the XULDocument after parsing.

Throws:
java.lang.IllegalStateException - if called prior to the end of parsing

getDefaultHandler

public org.xml.sax.helpers.DefaultHandler getDefaultHandler()
Get the DefaultHandler to hook up to the SAX parser


piParser

public static java.util.Map piParser(java.lang.String data)
Parse the data part of a processing instruction into name/value pairs.



Copyright © 2004 Terry Laurenzo. All Rights Reserved.