com.buglabs.util
Class XmlParser

java.lang.Object
  extended by com.buglabs.util.XmlParser

public class XmlParser
extends java.lang.Object

XMLParser is a highly-simplified XML DOM parser. It does not support namespaces.


Constructor Summary
XmlParser()
           
XmlParser(boolean ignoreNamespaces)
           
 
Method Summary
 boolean isIgnoreNamespaces()
           
 XmlNode parse(java.io.Reader reader)
           
static XmlNode parse(java.io.Reader reader, boolean ignoreNamespaces)
          Parse a string containing XML into a tree of XMLElement nodes.
static XmlNode parse(java.lang.String xml)
          Parse a string containing XML into a tree of XMLElement nodes.
static XmlNode parse(java.lang.String xml, boolean ignoreNamespaces)
          Parse a string containing XML into a tree of XMLElement nodes.
 void setIgnoreNamespaces(boolean ignoreNamespaces)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParser

public XmlParser()

XmlParser

public XmlParser(boolean ignoreNamespaces)
Method Detail

parse

public static XmlNode parse(java.lang.String xml)
                     throws java.io.IOException
Parse a string containing XML into a tree of XMLElement nodes.

Parameters:
xml -
Returns:
XMLElement
Throws:
java.io.IOException

parse

public static XmlNode parse(java.lang.String xml,
                            boolean ignoreNamespaces)
                     throws java.io.IOException
Parse a string containing XML into a tree of XMLElement nodes.

Parameters:
xml -
Returns:
XMLElement
Throws:
java.io.IOException

parse

public static XmlNode parse(java.io.Reader reader,
                            boolean ignoreNamespaces)
                     throws java.io.IOException
Parse a string containing XML into a tree of XMLElement nodes.

Parameters:
xml -
Returns:
XMLElement
Throws:
java.io.IOException

parse

public XmlNode parse(java.io.Reader reader)
              throws java.io.IOException
Throws:
java.io.IOException

isIgnoreNamespaces

public boolean isIgnoreNamespaces()

setIgnoreNamespaces

public void setIgnoreNamespaces(boolean ignoreNamespaces)