Class XmlNode


  • public class XmlNode
    extends java.lang.Object
    A simple replacement for a W3C DOM node.
    Since:
    5.1.4
    Author:
    Bela Ban
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​java.lang.String> attributes  
      protected java.util.List<XmlNode> children  
      protected java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      XmlNode​(java.lang.String name)  
    • Field Detail

      • name

        protected final java.lang.String name
      • attributes

        protected java.util.Map<java.lang.String,​java.lang.String> attributes
      • children

        protected java.util.List<XmlNode> children
    • Constructor Detail

      • XmlNode

        public XmlNode​(java.lang.String name)
    • Method Detail

      • getName

        public java.lang.String getName()
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      • getChildren

        public java.util.List<XmlNode> getChildren()
      • setAttributes

        public XmlNode setAttributes​(java.util.Map<java.lang.String,​java.lang.String> attrs)
      • addAttribute

        public XmlNode addAttribute​(java.lang.String attr_name,
                                    java.lang.String val)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • print

        protected java.lang.String print​(int indent)