| Modifier and Type | Class and Description |
|---|---|
class |
NodeImpl.ValueIterator |
| Constructor and Description |
|---|
NodeImpl() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
attributes()
The node attributes, may be empty.
|
NodeChildren |
children()
The node children
|
Node |
get(int index) |
<T> T |
get(String name)
Get a value from the current XML object.
|
String |
getAttribute(String name)
Get the value of an attribute.
|
Object |
getAttributes() |
Object |
getBackingGroovyObject() |
boolean |
getBoolean(String name) |
byte |
getByte(String name) |
char |
getChar(String name) |
NodeChildren |
getChildren() |
double |
getDouble(String name) |
float |
getFloat(String name) |
Object |
getGroovyNode() |
int |
getInt(String name) |
<T> List<T> |
getList(String name) |
long |
getLong(String name) |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getName() |
<T> T |
getPath(String path)
Get a value from the current XML using Groovy's GPath expression syntax.
|
Object |
getProperty(String property) |
short |
getShort(String name) |
Object |
getValue() |
Object |
invokeMethod(String method,
Object arguments) |
Iterator<String> |
iterator() |
Object |
leftShift(Node node) |
String |
name()
The name of the node
|
void |
setAttributes(Object value) |
void |
setChildren(NodeChildren value) |
void |
setGroovyNode(Object value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setName(Object value) |
void |
setProperty(String property,
Object value) |
void |
setValue(Object value) |
String |
toString() |
String |
value()
The node value.
|
get, getNode, getNodes, getPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNode, getNodes, getPathpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectgetMetaClass in class NodeBasepublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectsetMetaClass in class NodeBasepublic Object invokeMethod(String method, Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class NodeBasepublic Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class NodeBasepublic void setProperty(String property, Object value)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class NodeBasepublic Object getAttributes()
public void setAttributes(Object value)
public NodeChildren getChildren()
public void setChildren(NodeChildren value)
public Object getName()
public void setName(Object value)
public Object getValue()
public void setValue(Object value)
public Object getGroovyNode()
public void setGroovyNode(Object value)
public Map<String,String> attributes()
Nodeattributes in interface Nodepublic Node get(int index)
public NodeChildren children()
Nodepublic String getAttribute(String name)
NodegetAttribute in interface Nodename - The name of the attribute to getpublic float getFloat(String name)
public double getDouble(String name)
public char getChar(String name)
public boolean getBoolean(String name)
public long getLong(String name)
public int getInt(String name)
public short getShort(String name)
public byte getByte(String name)
public <T> T get(String name)
PathElement
This method returns the child whose name matches name. If several
children matches the name then a List of Node's
are returned.
If this object is a Node and you want to return an attribute value you need to prefix the name with an @. E.g. given
<category type="present">
<item when="Aug 10">
<name>Kathryn's Birthday</name>
<price>200</price>
</item>
</category>
then
String type = node.get("@type");
will return "present".
get in interface PathElementget in class NodeBaseT - The expected type of the return value.name - The name of the child, children or attribute.public <T> T getPath(String path)
PathElementgetPath in interface PathElementgetPath in class NodeBaseT - The expected type of the return value.path - The GPath expression syntaxpublic String value()
Nodepublic Object getBackingGroovyObject()
getBackingGroovyObject in class NodeBaseCopyright © 2010–2014. All rights reserved.