org.eclipse.jetty.xml
类 XmlParser.Node

java.lang.Object
  继承者 java.util.AbstractCollection<E>
      继承者 java.util.AbstractList<Object>
          继承者 org.eclipse.jetty.xml.XmlParser.Node
所有已实现的接口:
Iterable<Object>, Collection<Object>, List<Object>
包容类:
XmlParser

public static class XmlParser.Node
extends AbstractList<Object>

XML Node. Represents an XML element with optional attributes and ordered content.


字段摘要
 
从类 java.util.AbstractList 继承的字段
modCount
 
方法摘要
 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.
 
从类 java.util.AbstractList 继承的方法
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
从类 java.util.AbstractCollection 继承的方法
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 java.util.List 继承的方法
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

方法详细信息

getParent

public XmlParser.Node getParent()

getTag

public String getTag()

getPath

public String getPath()

getAttributes

public XmlParser.Attribute[] getAttributes()
Get an array of element attributes.


getAttribute

public String getAttribute(String name)
Get an element attribute.

返回:
attribute or null.

getAttribute

public String getAttribute(String name,
                           String dft)
Get an element attribute.

返回:
attribute or null.

size

public int size()
Get the number of children nodes.

指定者:
接口 Collection<Object> 中的 size
指定者:
接口 List<Object> 中的 size
指定者:
AbstractCollection<Object> 中的 size

get

public Object get(int i)
Get the ith child node or content.

指定者:
接口 List<Object> 中的 get
指定者:
AbstractList<Object> 中的 get
返回:
Node or String.

get

public XmlParser.Node get(String tag)
Get the first child node with the tag.

参数:
tag -
返回:
Node or null.

add

public void add(int i,
                Object o)
指定者:
接口 List<Object> 中的 add
覆盖:
AbstractList<Object> 中的 add

clear

public void clear()
指定者:
接口 Collection<Object> 中的 clear
指定者:
接口 List<Object> 中的 clear
覆盖:
AbstractList<Object> 中的 clear

getString

public String getString(String tag,
                        boolean tags,
                        boolean trim)
Get a tag as a string.

参数:
tag - The tag to get
tags - IF true, tags are included in the value.
trim - If true, trim the value.
返回:
results of get(tag).toString(tags).

toString

public String toString()
覆盖:
AbstractCollection<Object> 中的 toString

toString

public String toString(boolean tag)
Convert to a string.

参数:
tag - If false, only _content is shown.

toString

public String toString(boolean tag,
                       boolean trim)
Convert to a string.

参数:
tag - If false, only _content is shown.

iterator

public Iterator<XmlParser.Node> iterator(String tag)
Iterator over named child nodes.

参数:
tag - The tag of the nodes.
返回:
Iterator over all child nodes with the specified tag.


Copyright © 2013. All Rights Reserved.