com.jayway.restassured.path.xml.element
Interface Node

All Superinterfaces:
Iterable<String>, PathElement
All Known Implementing Classes:
NodeImpl

public interface Node
extends PathElement

A Node represents a single node in a XML document.


Method Summary
 Map<String,String> attributes()
          The node attributes, may be empty.
 NodeChildren children()
          The node children
 String getAttribute(String name)
          Get the value of an attribute.
 String name()
          The name of the node
 String value()
          The node value.
 
Methods inherited from interface com.jayway.restassured.path.xml.element.PathElement
get, getNode, getNodes
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

attributes

Map<String,String> attributes()
The node attributes, may be empty.

Returns:
The attributes associated with this node.

children

NodeChildren children()
The node children

Returns:
The node children

name

String name()
The name of the node

Returns:
The name of the node

value

String value()
The node value. Will return null unless this node is a leaf node in the XML document.

Returns:
The node value.

getAttribute

String getAttribute(String name)
Get the value of an attribute.

Parameters:
name - The name of the attribute to get
Returns:
The value of the attribute or null if no attribute with the given name was found.


Copyright © 2010-2011. All Rights Reserved.