Interface XmlNode
- All Known Implementing Classes:
JcabiXmlNode
,NativeXmlNode
public interface XmlNode
XML document node.
This abstraction is used to represent an XML node in the XML document.
We added it to be able to use two different implementations of XML nodes:
- one from the jcabi library
- another native implementation
- Since:
- 0.7
-
Method Details
-
children
Get all child nodes.- Returns:
- Child nodes.
-
text
String text()Retrieve node text content.- Returns:
- Text content.
-
attribute
Get attribute.- Parameters:
name
- Attribute name.- Returns:
- Attribute.
-
child
Get child node.- Parameters:
name
- Child node name.- Returns:
- Child node.
-
xpath
Find elements by xpath.- Parameters:
xpath
- XPath.- Returns:
- List of elements.
-
validate
void validate()Validate the node.
-