public static class XmlParser.Node extends AbstractList<Object>
Modifier and Type | Method and Description |
---|---|
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<XmlParser.Node> |
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.
|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public XmlParser.Node getParent()
public String getTag()
public String getPath()
public XmlParser.Attribute[] getAttributes()
public String getAttribute(String name)
name
- the name of the attributepublic String getAttribute(String name, String dft)
name
- the name of the elementdft
- the default valuepublic int size()
size
in interface Collection<Object>
size
in interface List<Object>
size
in class AbstractCollection<Object>
public Object get(int i)
public XmlParser.Node get(String tag)
tag
- the name of the tagpublic void add(int i, Object o)
public void clear()
clear
in interface Collection<Object>
clear
in interface List<Object>
clear
in class AbstractList<Object>
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<Object>
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.trim
- true to trim the contentpublic Iterator<XmlParser.Node> iterator(String tag)
tag
- The tag of the nodes.Copyright © 2010 - 2020 Adobe. All Rights Reserved