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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XMLDocument
public XMLDocument()
XMLDocument
public XMLDocument(boolean lenient)
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