|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PathElement
Base object for all XML objects.
| Method Summary | ||
|---|---|---|
|
get(String name)
Get a value from the current XML object. |
|
Node |
getNode(String name)
Get a Node whose name matches the supplied name
from the current XML object. |
|
List<Node> |
getNodes(String name)
Get a list of Node's whose name matches the supplied name
from the current XML object. |
|
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
<T> T get(String name)
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".
T - The expected type of the return value.name - The name of the child, children or attribute.
Node getNode(String name)
Node whose name matches the supplied name
from the current XML object.
Note that there's no guarantee that this method actually will return a Node. It could result in a .
name - The name of the Node to get.
null if non were found.List<Node> getNodes(String name)
Node's whose name matches the supplied name
from the current XML object.
name - The name of the Nodes to get.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||