org.mortbay.xml
Class XmlParser.Node
AbstractList
org.mortbay.xml.XmlParser.Node
- XmlParser
public static class XmlParser.Node
extends AbstractList
XML Node. Represents an XML element with optional attributes and ordered content.
add
public void add(int i,
Object o)
get
public XmlParser.Node get(String tag)
Get the first child node with the tag.
get
public Object get(int i)
Get the ith child node or content.
getAttribute
public String getAttribute(String name)
Get an element attribute.
getAttribute
public String getAttribute(String name,
String dft)
Get an element attribute.
getPath
public String getPath()
getString
public String getString(String tag,
boolean tags,
boolean trim)
Get a tag as a string.
tag
- The tag to gettags
- IF true, tags are included in the value.trim
- If true, trim the value.
- results of get(tag).toString(tags).
getTag
public String getTag()
iterator
public Iterator iterator(String tag)
Iterator over named child nodes.
tag
- The tag of the nodes.
- Iterator over all child nodes with the specified tag.
size
public int size()
Get the number of children nodes.
toString
public String toString()
toString
public String toString(boolean tag)
Convert to a string.
tag
- If false, only content is shown.
toString
public String toString(boolean tag,
boolean trim)
Convert to a string.
tag
- If false, only content is shown.
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.