public class XGMisc
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
allowLS30
Allow use of LS 3.0 features for output.
|
Constructor and Description |
---|
XGMisc() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
getFile(java.lang.String strFileName)
Returns a file from its name.
|
static int |
printNodeToFile(org.w3c.dom.Node node,
java.lang.String outputName)
Print a
Node into a file. |
static java.lang.String |
printNodeToString(org.w3c.dom.Node node)
Print a
Node into a string. |
static void |
write(java.lang.String strText,
java.lang.String strFileName)
Writes a text into a file.
|
public static int printNodeToFile(org.w3c.dom.Node node, java.lang.String outputName) throws java.io.IOException, java.io.FileNotFoundException
Node
into a file.node
- The Node
to print.outputName
- The name out the output file.-1
if the operation failed,
1
otherwise.java.io.IOException
java.io.FileNotFoundException
public static java.lang.String printNodeToString(org.w3c.dom.Node node) throws java.io.IOException, java.io.FileNotFoundException
Node
into a string.node
- the Node
to printjava.io.IOException
java.io.FileNotFoundException
public static java.io.File getFile(java.lang.String strFileName) throws java.io.IOException
strFileName
- the initial file namejava.io.IOException
public static void write(java.lang.String strText, java.lang.String strFileName) throws java.io.IOException
strText
- The text to write.strFileName
- The URI of the file.java.io.IOException
- If file cannot be written.