public class DOMHelper extends Object
Modifier | Constructor and Description |
---|---|
protected |
DOMHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
appendChild(Document doc,
Element parentElement,
String elementName,
String elementValue)
Add a child element to a parent element
|
static String |
convertDocToString(Document doc)
Convert a DOM document to a string
|
static Document |
getEventDocFromUrl(String url)
Get a DOM document from the supplied URL
|
static String |
getValueFromElement(Element element,
String tagName)
Gets the string value of the tag element name passed
|
static void |
setHttpClient(org.apache.http.client.HttpClient newHttpClient) |
static boolean |
writeDocumentToFile(Document doc,
String localFile)
Write the Document out to a file using nice formatting
|
public static void setHttpClient(org.apache.http.client.HttpClient newHttpClient)
public static String getValueFromElement(Element element, String tagName)
element
- tagName
- public static Document getEventDocFromUrl(String url) throws TvDbException
url
- TvDbException
public static String convertDocToString(Document doc) throws TransformerException
doc
- TransformerException
public static boolean writeDocumentToFile(Document doc, String localFile)
doc
- The document to savelocalFile
- The file to write toCopyright © 2012-2015. All Rights Reserved.