public class XmlNode extends Object
Constructor and Description |
---|
XmlNode(Node node)
Create a new XmlNode wrapping the given DOM Node.
|
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String name)
Return the attribute with the given name.
|
List<XmlNode> |
getChildren() |
List<XmlNode> |
getChildren(String name)
Return a list of all child nodes with the given name.
|
XmlNode |
getFirstChild(String name)
Return the first child with the given name.
|
String |
getNodeName() |
String |
getTextContent()
Returns the text content of this node and its descendants.
|
public XmlNode(Node node)
node
- the DOM Nodepublic String getNodeName()
@Nonnull public List<XmlNode> getChildren(String name)
name
- the node name@Nullable public XmlNode getFirstChild(String name)
name
- the name@Nullable public String getAttribute(String name)
name
- the attribute namepublic String getTextContent()
Node.getTextContent()
Copyright © 2002-2017 Atlassian. All Rights Reserved.