Package org.eclipse.jetty.xml
Class XmlParser.Node
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<Object>
-
- org.eclipse.jetty.xml.XmlParser.Node
-
- Enclosing class:
- XmlParser
@Deprecated(since="2021-05-27") public static class XmlParser.Node extends AbstractList<Object>
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.XML Node. Represents an XML element with optional attributes and ordered content.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(int i, Object o)Deprecated.voidclear()Deprecated.Objectget(int i)Deprecated.Get the ith child node or content.XmlParser.Nodeget(String tag)Deprecated.Get the first child node with the tag.StringgetAttribute(String name)Deprecated.Get an element attribute.StringgetAttribute(String name, String dft)Deprecated.Get an element attribute.XmlParser.Attribute[]getAttributes()Deprecated.Get an array of element attributes.XmlParser.NodegetParent()Deprecated.StringgetPath()Deprecated.StringgetString(String tag, boolean tags, boolean trim)Deprecated.Get a tag as a string.StringgetTag()Deprecated.Iterator<XmlParser.Node>iterator(String tag)Deprecated.Iterator over named child nodes.intsize()Deprecated.Get the number of children nodes.StringtoString()Deprecated.StringtoString(boolean tag)Deprecated.Convert to a string.StringtoString(boolean tag, boolean trim)Deprecated.Convert to a string.-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
getParent
public XmlParser.Node getParent()
Deprecated.
-
getTag
public String getTag()
Deprecated.
-
getPath
public String getPath()
Deprecated.
-
getAttributes
public XmlParser.Attribute[] getAttributes()
Deprecated.Get an array of element attributes.- Returns:
- the attributes
-
getAttribute
public String getAttribute(String name)
Deprecated.Get an element attribute.- Parameters:
name- the name of the attribute- Returns:
- attribute or null.
-
getAttribute
public String getAttribute(String name, String dft)
Deprecated.Get an element attribute.- Parameters:
name- the name of the elementdft- the default value- Returns:
- attribute or null.
-
size
public int size()
Deprecated.Get the number of children nodes.- Specified by:
sizein interfaceCollection<Object>- Specified by:
sizein interfaceList<Object>- Specified by:
sizein classAbstractCollection<Object>
-
get
public Object get(int i)
Deprecated.Get the ith child node or content.
-
get
public XmlParser.Node get(String tag)
Deprecated.Get the first child node with the tag.- Parameters:
tag- the name of the tag- Returns:
- Node or null.
-
add
public void add(int i, Object o)Deprecated.
-
clear
public void clear()
Deprecated.- Specified by:
clearin interfaceCollection<Object>- Specified by:
clearin interfaceList<Object>- Overrides:
clearin classAbstractList<Object>
-
getString
public String getString(String tag, boolean tags, boolean trim)
Deprecated.Get a tag as a string.- Parameters:
tag- The tag to gettags- IF true, tags are included in the value.trim- If true, trim the value.- Returns:
- results of get(tag).toString(tags).
-
toString
public String toString()
Deprecated.- Overrides:
toStringin classAbstractCollection<Object>
-
toString
public String toString(boolean tag)
Deprecated.Convert to a string.- Parameters:
tag- If false, only _content is shown.- Returns:
- the string value
-
toString
public String toString(boolean tag, boolean trim)
Deprecated.Convert to a string.- Parameters:
tag- If false, only _content is shown.trim- true to trim the content- Returns:
- the trimmed content
-
iterator
public Iterator<XmlParser.Node> iterator(String tag)
Deprecated.Iterator over named child nodes.- Parameters:
tag- The tag of the nodes.- Returns:
- Iterator over all child nodes with the specified tag.
-
-