Package org.eclipse.jetty.xml
Class XmlParser.Node
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.lang.Object>
-
- org.eclipse.jetty.xml.XmlParser.Node
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>,java.util.Collection<java.lang.Object>,java.util.List<java.lang.Object>
- Enclosing class:
- XmlParser
@Deprecated(since="2021-05-27") public static class XmlParser.Node extends java.util.AbstractList<java.lang.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, java.lang.Object o)Deprecated.voidclear()Deprecated.java.lang.Objectget(int i)Deprecated.Get the ith child node or content.XmlParser.Nodeget(java.lang.String tag)Deprecated.Get the first child node with the tag.java.lang.StringgetAttribute(java.lang.String name)Deprecated.Get an element attribute.java.lang.StringgetAttribute(java.lang.String name, java.lang.String dft)Deprecated.Get an element attribute.XmlParser.Attribute[]getAttributes()Deprecated.Get an array of element attributes.XmlParser.NodegetParent()Deprecated.java.lang.StringgetPath()Deprecated.java.lang.StringgetString(java.lang.String tag, boolean tags, boolean trim)Deprecated.Get a tag as a string.java.lang.StringgetTag()Deprecated.java.util.Iterator<XmlParser.Node>iterator(java.lang.String tag)Deprecated.Iterator over named child nodes.intsize()Deprecated.Get the number of children nodes.java.lang.StringtoString()Deprecated.java.lang.StringtoString(boolean tag)Deprecated.Convert to a string.java.lang.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
-
-
-
-
Method Detail
-
getParent
public XmlParser.Node getParent()
Deprecated.
-
getTag
public java.lang.String getTag()
Deprecated.
-
getPath
public java.lang.String getPath()
Deprecated.
-
getAttributes
public XmlParser.Attribute[] getAttributes()
Deprecated.Get an array of element attributes.- Returns:
- the attributes
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)
Deprecated.Get an element attribute.- Parameters:
name- the name of the attribute- Returns:
- attribute or null.
-
getAttribute
public java.lang.String getAttribute(java.lang.String name, java.lang.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 interfacejava.util.Collection<java.lang.Object>- Specified by:
sizein interfacejava.util.List<java.lang.Object>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Object>
-
get
public java.lang.Object get(int i)
Deprecated.Get the ith child node or content.- Specified by:
getin interfacejava.util.List<java.lang.Object>- Specified by:
getin classjava.util.AbstractList<java.lang.Object>- Returns:
- Node or String.
-
get
public XmlParser.Node get(java.lang.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, java.lang.Object o)Deprecated.- Specified by:
addin interfacejava.util.List<java.lang.Object>- Overrides:
addin classjava.util.AbstractList<java.lang.Object>
-
clear
public void clear()
Deprecated.- Specified by:
clearin interfacejava.util.Collection<java.lang.Object>- Specified by:
clearin interfacejava.util.List<java.lang.Object>- Overrides:
clearin classjava.util.AbstractList<java.lang.Object>
-
getString
public java.lang.String getString(java.lang.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 java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.util.AbstractCollection<java.lang.Object>
-
toString
public java.lang.String toString(boolean tag)
Deprecated.Convert to a string.- Parameters:
tag- If false, only _content is shown.- Returns:
- the string value
-
toString
public java.lang.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 java.util.Iterator<XmlParser.Node> iterator(java.lang.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.
-
-