Class XmlUtils
java.lang.Object
de.hybris.platform.subscriptionfacades.util.XmlUtils
Helper class for xml transformation
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyTransformationResource(String xml, String transformationResource) Removes all ignored nodes from the given xmlstatic final StringevaluateXPath(String targetXml, String xPath) protected static Stringtransform(String targetXml, StreamSource source)
-
Method Details
-
applyTransformationResource
Removes all ignored nodes from the given xml- Parameters:
xml- the xml to processtransformationResource- the transformation to apply (classpath resource)- Returns:
- the processed xml (in case of errors the original xml is returned)
-
evaluateXPath
- Parameters:
targetXml- the XML to apply the XPath expression toxPath- the XPath expression to apply- Returns:
- the result of XPath evaluation
-
transform
protected static String transform(String targetXml, StreamSource source) throws TransformerFactoryConfigurationError
-