Class XmlUtils
- java.lang.Object
-
- de.hybris.platform.subscriptionfacades.util.XmlUtils
-
public class XmlUtils extends java.lang.ObjectHelper class for xml transformation
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringapplyTransformationResource(java.lang.String xml, java.lang.String transformationResource)Removes all ignored nodes from the given xmlstatic java.lang.StringevaluateXPath(java.lang.String targetXml, java.lang.String xPath)protected static java.lang.Stringtransform(java.lang.String targetXml, javax.xml.transform.stream.StreamSource source)
-
-
-
Method Detail
-
applyTransformationResource
public static java.lang.String applyTransformationResource(java.lang.String xml, java.lang.String transformationResource)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
public static final java.lang.String evaluateXPath(java.lang.String targetXml, java.lang.String xPath)- Parameters:
targetXml- the XML to apply the XPath expression toxPath- the XPath expression to apply- Returns:
- the result of XPath evaluation
-
transform
protected static java.lang.String transform(java.lang.String targetXml, javax.xml.transform.stream.StreamSource source) throws javax.xml.transform.TransformerFactoryConfigurationError- Throws:
javax.xml.transform.TransformerFactoryConfigurationError
-
-