Class XmlUtils


  • public class XmlUtils
    extends Object
    • Constructor Detail

      • XmlUtils

        private XmlUtils()
    • Method Detail

      • getChildValue

        public static String getChildValue​(org.dom4j.Element element,
                                           String attribute)
      • prettyPrintElementNoNamespace

        public static String prettyPrintElementNoNamespace​(org.dom4j.Element node)
      • trimTextBeforeEnd

        public static void trimTextBeforeEnd​(org.dom4j.Element parent,
                                             org.dom4j.Node target)
      • setNamespace

        private static void setNamespace​(org.dom4j.Element element,
                                         org.dom4j.Namespace nameSpace)
      • addDomWithValueList

        public static void addDomWithValueList​(org.dom4j.Element element,
                                               String attribute,
                                               String subAttribute,
                                               List<String> values)
      • addDomWithKeyValue

        public static void addDomWithKeyValue​(org.dom4j.Element node,
                                              String key,
                                              Object value)
      • removeAllNamespaces

        public static void removeAllNamespaces​(org.dom4j.Element ele)
      • setNamespaces

        private static void setNamespaces​(List l,
                                          org.dom4j.Namespace ns)
        Recursively sets the namespace of the List and all children if the current namespace is match
      • removeNamespaces

        private static void removeNamespaces​(List l)
        Recursively removes the namespace of the list and all its children: sets to Namespace.NO_NAMESPACE
      • setNamespaces

        private static void setNamespaces​(org.dom4j.Element elem,
                                          org.dom4j.Namespace ns)
        Recursively sets the namespace of the element and all its children.