Package com.atlassian.jira.util.xml
Class XmlNode
java.lang.Object
com.atlassian.jira.util.xml.XmlNode
Wrapper around an XML DOM node object providing helper methods for simple parsing of XML files.
- Since:
- v6.4.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Return the attribute with the given name.getChildren(String name) Return a list of all child nodes with the given name.getFirstChild(String name) Return the first child with the given name.Returns the text content of this node and its descendants.
-
Constructor Details
-
XmlNode
Create a new XmlNode wrapping the given DOM Node.- Parameters:
node- the DOM Node
-
-
Method Details
-
getNodeName
-
getChildren
-
getChildren
Return a list of all child nodes with the given name.- Parameters:
name- the node name- Returns:
- a list of all child nodes with the given name.
-
getFirstChild
Return the first child with the given name.- Parameters:
name- the name- Returns:
- the first child with the given name (or null if none exist).
-
getAttribute
Return the attribute with the given name.- Parameters:
name- the attribute name- Returns:
- the attribute with the given name (or null if it doesn't exist).
-
getTextContent
Returns the text content of this node and its descendants.- Returns:
- the text content of this node and its descendants.
- See Also:
-