public class XMLUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MORE_THAN_ONE_ELEMENT_FOUND_WITH_GIVEN_VALIDATION_EXPRESSION |
static String |
MORE_THAN_ONE_SIGNATURE_FOUND |
static String |
NOT_FOUND_ELEMENT_WITH_GIVEN_VALIDATION_EXPRESSION |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
createXmlUsing(Document doc) |
static Document |
documentBasedOnThe(byte[] xml) |
static Document |
documentBasedOnThe(InputStream inputStream)
Creates a DOM Document from an InputStream.
|
static NodeList |
getElements(String xpathExpr,
Document document) |
static String |
getIDAttributeName(Element element) |
static void |
setAttributeAsIdCreatingIfNotFound(Element element,
String attributeName) |
static Element |
validateXpathInDocument(Document document,
String expression) |
public static final String NOT_FOUND_ELEMENT_WITH_GIVEN_VALIDATION_EXPRESSION
public static final String MORE_THAN_ONE_ELEMENT_FOUND_WITH_GIVEN_VALIDATION_EXPRESSION
public static final String MORE_THAN_ONE_SIGNATURE_FOUND
public static byte[] createXmlUsing(Document doc)
public static Document documentBasedOnThe(byte[] xml)
public static Document documentBasedOnThe(InputStream inputStream)
inputStream - the input stream containing XML dataorg.mule.runtime.api.exception.MuleRuntimeException - if the document cannot be parsedpublic static void setAttributeAsIdCreatingIfNotFound(Element element, String attributeName)
Copyright © 2026 MuleSoft, Inc.. All rights reserved.