Class XMLUtil


  • public final class XMLUtil
    extends java.lang.Object
    This class contains a set of XML related utility methods.
    Version:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static org.w3c.dom.Element findNextSibling​(org.w3c.dom.Node startNode)
      Find the next sibling element.
      static java.lang.String getAttributeValue​(org.w3c.dom.Element element, java.lang.String attrName)
      Get attribute value.
      static java.lang.String getAttributeValueNS​(org.w3c.dom.Element element, java.lang.String namespace, java.lang.String attrName)
      Get attribute value.
      static org.w3c.dom.Element getFirstChild​(org.w3c.dom.Element element)
      Get the first child element from the input elment.
      static org.w3c.dom.Element getNextSibling​(org.w3c.dom.Element element)
      Get the next sibling element.
      static java.lang.String getText​(org.w3c.dom.Element element)
      Get the text that is associated with this element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLUtil

        public XMLUtil()
    • Method Detail

      • getAttributeValue

        public static java.lang.String getAttributeValue​(org.w3c.dom.Element element,
                                                         java.lang.String attrName)
        Get attribute value.
      • getAttributeValueNS

        public static java.lang.String getAttributeValueNS​(org.w3c.dom.Element element,
                                                           java.lang.String namespace,
                                                           java.lang.String attrName)
        Get attribute value.
      • getFirstChild

        public static org.w3c.dom.Element getFirstChild​(org.w3c.dom.Element element)
        Get the first child element from the input elment.
      • getNextSibling

        public static org.w3c.dom.Element getNextSibling​(org.w3c.dom.Element element)
        Get the next sibling element.
      • findNextSibling

        protected static org.w3c.dom.Element findNextSibling​(org.w3c.dom.Node startNode)
        Find the next sibling element.
      • getText

        public static java.lang.String getText​(org.w3c.dom.Element element)
        Get the text that is associated with this element.