|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.utils.webutils.XMLUtils
public class XMLUtils
XML utilities. To parse simple XML etc.
| Constructor Summary | |
|---|---|
XMLUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
fromDOMtoFile(org.w3c.dom.Document DOMdocument,
java.lang.String filePath)
From JTidy DOM to file |
static java.lang.String |
getXmlComment(java.lang.String text)
Returns a string formatted as xml comment: |
static XmlNode |
getXmlFromHTML(java.lang.String url,
java.lang.String xhtmlFile)
|
static XmlNode |
getXmlFromReader(java.io.BufferedReader reader)
Get the XML as SimpleElement from a URL reader. |
static org.w3c.dom.Document |
tidyDOM(java.io.InputStream inputStream)
JTidy is designed to read-in typical-quality (that is to say, bad) HTML and output something cleaner (you have a choice of options), and also provides a DOM interface for traversing HTML documents that can be fed to an XML parser. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLUtils()
| Method Detail |
|---|
public static java.lang.String fromDOMtoFile(org.w3c.dom.Document DOMdocument,
java.lang.String filePath)
throws java.lang.SecurityException,
java.io.FileNotFoundException
DOMdocument - filePath -
java.lang.SecurityException
java.io.FileNotFoundExceptionpublic static java.lang.String getXmlComment(java.lang.String text)
<!-- comment to be inserted -->
text - the comment to be inserted
public static XmlNode getXmlFromHTML(java.lang.String url,
java.lang.String xhtmlFile)
throws java.io.IOException
java.io.IOException
public static XmlNode getXmlFromReader(java.io.BufferedReader reader)
throws java.io.IOException
reader -
java.io.IOException
public static org.w3c.dom.Document tidyDOM(java.io.InputStream inputStream)
throws java.lang.SecurityException,
java.io.FileNotFoundException
inputStream -
java.io.FileNotFoundException
java.lang.SecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||