Package de.firstdata.ipg.api.client
Class XMLTransformer
- java.lang.Object
-
- de.firstdata.ipg.api.client.XMLTransformer
-
public final class XMLTransformer extends Object
XML formatter
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
transform(String unformattedXML)
This method will try to do a single pass of the input string to format it in pretty XML.static String
transform(String unformattedXML, int numOfSpaceForIndents)
This method will try to do a single pass of the input string to format it in pretty XML.
-
-
-
Method Detail
-
transform
public static String transform(@Nonnull String unformattedXML)
This method will try to do a single pass of the input string to format it in pretty XML. For the issues observed, we are trying to avoid any expensive operations for trying to format the XMLs just for the sake of printing it in the logs. Formats the XML with default indent of 4- Parameters:
unformattedXML
- - The raw XML with or without line breaks which needs formatting- Returns:
- formatted XML for pretty printing
-
transform
public static String transform(@Nonnull String unformattedXML, int numOfSpaceForIndents)
This method will try to do a single pass of the input string to format it in pretty XML. For the issues observed, we are trying to avoid any expensive operations for trying to format the XMLs just for the sake of printing it in the logs- Parameters:
unformattedXML
- - The raw XML with or without line breaks which needs formattingnumOfSpaceForIndents
- - Number of space to be added for indents for pretty printing the XML- Returns:
- formatted XML for pretty printing
-
-