Class XmlNode


  • public final class XmlNode
    extends Object
    XML smart element. Utility class that simplifies work with XML.
    Since:
    0.1
    • Constructor Detail

      • XmlNode

        public XmlNode​(String xml)
        Constructor.
        Parameters:
        xml - XML string.
      • XmlNode

        public XmlNode​(Node parent)
        Constructor.
        Parameters:
        parent - XML document
      • XmlNode

        public XmlNode​(com.jcabi.xml.XML parent)
        Constructor.
        Parameters:
        parent - Parent node.
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • children

        public Stream<XmlNode> children()
        Get all child nodes.
        Returns:
        Child nodes.
      • text

        public String text()
        Retrieve node text content.
        Returns:
        Text content.
      • attribute

        public Optional<String> attribute​(String name)
        Get attribute.
        Parameters:
        name - Attribute name.
        Returns:
        Attribute.