org.skunk.minixml
Class XMLDocument

java.lang.Object
  |
  +--org.skunk.minixml.XMLDocument

public class XMLDocument
extends java.lang.Object

an insultingly simple wrapper for a bunch of document elements.


Constructor Summary
XMLDocument()
           
XMLDocument(boolean lenient)
           
 
Method Summary
 XMLDocument addElement(java.lang.Object elem)
           
 java.util.ListIterator contents()
           
 byte[] getBytes()
          convenience method
 XMLElement getElement(java.lang.String urlLikePath)
          convenience method for accessing an element with a url-like path, e.g., html/body/h1.
 XMLElement getRootElement()
          returns the first XMLElement in the contents collection
 boolean hasRoot()
           
 boolean isLenient()
           
 java.lang.String toString()
          returns a textual representation of the document, itself xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLDocument

public XMLDocument()

XMLDocument

public XMLDocument(boolean lenient)
Method Detail

isLenient

public boolean isLenient()

addElement

public XMLDocument addElement(java.lang.Object elem)
                       throws MalformedXMLException

hasRoot

public boolean hasRoot()

contents

public java.util.ListIterator contents()

getRootElement

public XMLElement getRootElement()
returns the first XMLElement in the contents collection

getElement

public XMLElement getElement(java.lang.String urlLikePath)
convenience method for accessing an element with a url-like path, e.g., html/body/h1. Always returns the first matching element.

toString

public java.lang.String toString()
returns a textual representation of the document, itself xml
Overrides:
toString in class java.lang.Object

getBytes

public final byte[] getBytes()
convenience method