|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList org.mortbay.xml.XmlParser.Node
public static class XmlParser.Node
XML Node. Represents an XML element with optional attributes and ordered content.
Field Summary | |
---|---|
private XmlParser.Attribute[] |
_attrs
|
private boolean |
_lastString
|
private ArrayList |
_list
|
(package private) XmlParser.Node |
_parent
|
private String |
_path
|
private String |
_tag
|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
XmlParser.Node(XmlParser.Node parent,
String tag,
Attributes attrs)
|
Method Summary | |
---|---|
void |
add(int i,
Object o)
|
void |
clear()
|
Object |
get(int i)
Get the ith child node or content. |
XmlParser.Node |
get(String tag)
Get the first child node with the tag. |
String |
getAttribute(String name)
Get an element attribute. |
String |
getAttribute(String name,
String dft)
Get an element attribute. |
XmlParser.Attribute[] |
getAttributes()
Get an array of element attributes. |
XmlParser.Node |
getParent()
|
String |
getPath()
|
String |
getString(String tag,
boolean tags,
boolean trim)
Get a tag as a string. |
String |
getTag()
|
Iterator |
iterator(String tag)
Iterator over named child nodes. |
int |
size()
Get the number of children nodes. |
String |
toString()
|
String |
toString(boolean tag)
Convert to a string. |
String |
toString(boolean tag,
boolean trim)
Convert to a string. |
private void |
toString(StringBuffer buf,
boolean tag)
|
Methods inherited from class java.util.AbstractList |
---|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Field Detail |
---|
XmlParser.Node _parent
private ArrayList _list
private String _tag
private XmlParser.Attribute[] _attrs
private boolean _lastString
private String _path
Constructor Detail |
---|
XmlParser.Node(XmlParser.Node parent, String tag, Attributes attrs)
Method Detail |
---|
public XmlParser.Node getParent()
public String getTag()
public String getPath()
public XmlParser.Attribute[] getAttributes()
public String getAttribute(String name)
public String getAttribute(String name, String dft)
public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public Object get(int i)
get
in interface List
get
in class AbstractList
public XmlParser.Node get(String tag)
tag
-
public void add(int i, Object o)
add
in interface List
add
in class AbstractList
public void clear()
clear
in interface Collection
clear
in interface List
clear
in class AbstractList
public String getString(String tag, boolean tags, boolean trim)
tag
- The tag to gettags
- IF true, tags are included in the value.trim
- If true, trim the value.
public String toString()
toString
in class AbstractCollection
public String toString(boolean tag)
tag
- If false, only _content is shown.public String toString(boolean tag, boolean trim)
tag
- If false, only _content is shown.private void toString(StringBuffer buf, boolean tag)
public Iterator iterator(String tag)
tag
- The tag of the nodes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |