|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEasyNode
public class EasyNode
Provides an easy-to-use wrapper around a Saxon NodeInfo.
Field Summary | |
---|---|
private Vector |
attrNames
Attribute names for this node |
private Vector |
attrValues
Attribute values for this node |
private Vector |
children
Child elements for this node |
private NodeInfo |
wrapped
The node we are wrapping |
Constructor Summary | |
---|---|
EasyNode(NodeInfo toWrap)
Wrap a NodeInfo |
Method Summary | |
---|---|
String |
attrName(int index)
Get a specific numbered attribute's name |
String |
attrValue(int index)
Get a specific numbered attribute's value |
String |
attrValue(String name)
Get a named attribute's value, or null if no such name found. |
EasyNode |
child(int index)
Get a specific numbered child of this node |
EasyNode |
child(String name)
Get the first child node with the specified name, case insensitive. |
private void |
getAttrs()
Iterate the attributes and fill the 'attrNames' and 'attrValues' vectors. |
private void |
getChildren()
Iterate the children and fill the 'children' vector. |
NodeInfo |
getWrappedNode()
Get the actual node we're wrapping |
boolean |
hasAttr(String name)
Check if this node has the given attribute |
boolean |
isElement()
Checks if this is an element node |
boolean |
isText()
Checks if this is a text node |
String |
name()
Get the name of this node |
int |
nAttrs()
Get the number of attributes this node has |
int |
nChildren()
Get a count of the number of children this node has |
EasyNode |
parent()
Get the parent of this node (if any) |
String |
toString()
Get the string value of this node |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private NodeInfo wrapped
private Vector attrNames
private Vector attrValues
private Vector children
Constructor Detail |
---|
public EasyNode(NodeInfo toWrap)
Method Detail |
---|
private void getAttrs()
private void getChildren()
public int nAttrs()
public String attrName(int index)
public String attrValue(int index)
public boolean hasAttr(String name)
public String attrValue(String name)
public int nChildren()
public EasyNode child(int index)
public EasyNode child(String name)
public EasyNode parent()
public String name()
public boolean isElement()
public boolean isText()
public String toString()
toString
in class Object
public NodeInfo getWrappedNode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |