- java.lang.Object
-
- com.pervasive.datarush.util.XMLUtil
-
public class XMLUtil extends Object
Utility methods for the manipulation of XML documents and elements.
-
-
Constructor Summary
Constructors Constructor Description XMLUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Document
docFromFilePath(String documentPath)
static Transformer
prepareTransformer()
static void
prettyPrintToFile(File f, Document doc)
Pretty print a specified XML document to a file.static String
prettyPrintToString(Document doc)
Pretty print a specified XML document to a string.
-
-
-
Method Detail
-
prettyPrintToFile
public static void prettyPrintToFile(File f, Document doc)
Pretty print a specified XML document to a file.- Parameters:
f
- theFile
to which the document should be serializeddoc
- the XML document to serialize
-
prettyPrintToString
public static String prettyPrintToString(Document doc)
Pretty print a specified XML document to a string.- Parameters:
doc
- the XML document to serialize- Returns:
- a string containing serialized XML document
-
prepareTransformer
public static Transformer prepareTransformer()
-
-