public class XmlUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkNamespaceEquals(String namespace1,
String namespace2)
Check true if namespace strings are equals.
|
static List<Element> |
getChildElements(Node parent,
String namespaceURI,
String localPart)
Iterates all the children of given parent element and returns all elements with given localPart and namespace
|
static Element |
getSingleElement(Node parent,
String xmlNamespace,
String nodeName)
Returns null if there is no child element of given parent with the given namespace and node name.
|
static Element |
getWrappingElement(Element parent,
Map<String,String> metadata)
Returns wrapping element.
|
static void |
markElementAsNil(Document document,
Element element)
Marks element as nil - will add xsi:nil attribute to the element with value "true"
|
public static List<Element> getChildElements(Node parent, String namespaceURI, String localPart)
parent - parent elementlocalPart - namespaceURI - public static Element getSingleElement(Node parent, String xmlNamespace, String nodeName) throws XmlParsingException
parent - xmlNamespace - nodeName - XmlParsingException - if there is more than one child elements with the given xml namespace and node namepublic static Element getWrappingElement(Element parent, Map<String,String> metadata) throws XmlProcessingException
parent - metadata - XmlProcessingExceptionpublic static boolean checkNamespaceEquals(String namespace1, String namespace2)
namespace1 - namespace2 - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.