Class JcabiXmlNode

  • All Implemented Interfaces:
    XmlNode

    public final class JcabiXmlNode
    extends Object
    implements XmlNode
    Jcabi XML node.
    Since:
    0.8
    • Method Detail

      • children

        public Stream<XmlNode> children()
        Description copied from interface: XmlNode
        Get all child nodes.
        Specified by:
        children in interface XmlNode
        Returns:
        Child nodes.
      • text

        public String text()
        Description copied from interface: XmlNode
        Retrieve node text content.
        Specified by:
        text in interface XmlNode
        Returns:
        Text content.
      • attribute

        public Optional<String> attribute​(String name)
        Description copied from interface: XmlNode
        Get attribute.
        Specified by:
        attribute in interface XmlNode
        Parameters:
        name - Attribute name.
        Returns:
        Attribute.
      • child

        public XmlNode child​(String name)
        Description copied from interface: XmlNode
        Get child node.
        Specified by:
        child in interface XmlNode
        Parameters:
        name - Child node name.
        Returns:
        Child node.
      • xpath

        public List<String> xpath​(String xpath)
        Description copied from interface: XmlNode
        Find elements by xpath.
        Specified by:
        xpath in interface XmlNode
        Parameters:
        xpath - XPath.
        Returns:
        List of elements.
      • validate

        public void validate()
        Description copied from interface: XmlNode
        Validate the node.
        Specified by:
        validate in interface XmlNode