public static class XmlParser.Node
extends java.util.AbstractList<java.lang.Object>
Modifier and Type | Method and Description |
---|---|
void |
add(int i,
java.lang.Object o) |
void |
clear() |
java.lang.Object |
get(int i)
Get the ith child node or content.
|
XmlParser.Node |
get(java.lang.String tag)
Get the first child node with the tag.
|
java.lang.String |
getAttribute(java.lang.String name)
Get an element attribute.
|
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String dft)
Get an element attribute.
|
XmlParser.Attribute[] |
getAttributes()
Get an array of element attributes.
|
XmlParser.Node |
getParent() |
java.lang.String |
getPath() |
java.lang.String |
getString(java.lang.String tag,
boolean tags,
boolean trim)
Get a tag as a string.
|
java.lang.String |
getTag() |
java.util.Iterator<XmlParser.Node> |
iterator(java.lang.String tag)
Iterator over named child nodes.
|
int |
size()
Get the number of children nodes.
|
java.lang.String |
toString() |
java.lang.String |
toString(boolean tag)
Convert to a string.
|
java.lang.String |
toString(boolean tag,
boolean trim)
Convert to a string.
|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public XmlParser.Node getParent()
public java.lang.String getTag()
public java.lang.String getPath()
public XmlParser.Attribute[] getAttributes()
public java.lang.String getAttribute(java.lang.String name)
name
- the name of the attributepublic java.lang.String getAttribute(java.lang.String name, java.lang.String dft)
name
- the name of the elementdft
- the default valuepublic int size()
size
in interface java.util.Collection<java.lang.Object>
size
in interface java.util.List<java.lang.Object>
size
in class java.util.AbstractCollection<java.lang.Object>
public java.lang.Object get(int i)
get
in interface java.util.List<java.lang.Object>
get
in class java.util.AbstractList<java.lang.Object>
public XmlParser.Node get(java.lang.String tag)
tag
- the name of the tagpublic void add(int i, java.lang.Object o)
add
in interface java.util.List<java.lang.Object>
add
in class java.util.AbstractList<java.lang.Object>
public void clear()
clear
in interface java.util.Collection<java.lang.Object>
clear
in interface java.util.List<java.lang.Object>
clear
in class java.util.AbstractList<java.lang.Object>
public java.lang.String getString(java.lang.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 java.lang.String toString()
toString
in class java.util.AbstractCollection<java.lang.Object>
public java.lang.String toString(boolean tag)
tag
- If false, only _content is shown.public java.lang.String toString(boolean tag, boolean trim)
tag
- If false, only _content is shown.trim
- true to trim the contentpublic java.util.Iterator<XmlParser.Node> iterator(java.lang.String tag)
tag
- The tag of the nodes.Copyright © 1995–2023 Webtide. All rights reserved.