public class DocumentHelper extends Object
Constructor and Description |
---|
DocumentHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
asString(Node node)
Format and return the string representation of the specified node and it's children
|
static Document |
buildModel(InputStream is) |
static Document |
buildModel(String content) |
static Document |
fromCsv(InputStream is)
Converts a CSV file into the XML equivalent of that data.
|
static Document |
fromTsv(InputStream is)
Converts a TSV file into the XML equivalent of that data.
|
static InputStream |
load(String resource) |
static Document |
loadDocument(String resource) |
static String |
loadString(String resource) |
static IModel |
modelFromResource(String resource) |
public static InputStream load(String resource)
public static Document loadDocument(String resource) throws Exception
Exception
public static Document buildModel(String content) throws GramarException
GramarException
public static Document buildModel(InputStream is) throws GramarException
GramarException
public static Document fromTsv(InputStream is) throws GramarException
is
- the text content of a tab-separated fileGramarException
public static Document fromCsv(InputStream is) throws GramarException
is
- the text content of a comma-separated fileGramarException
public static String asString(Node node) throws TransformerException
node
- the node to representTransformerException
public static IModel modelFromResource(String resource) throws GramarException
GramarException
Copyright © 2015. All rights reserved.