|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infoglue.cms.util.XMLHelper
public class XMLHelper
This class is an utility class meant to be filled with reusable snippets of code concerning handling of XML in different shapes. No application specific code can be put here!!!
| Constructor Summary | |
|---|---|
XMLHelper()
|
|
| Method Summary | |
|---|---|
static org.w3c.dom.Document |
readDocumentFromByteArray(byte[] xml)
This method fetches the document-root(DOM) from a xml-document located in a byte[] specified by user argument. |
static org.w3c.dom.Document |
readDocumentFromFile(java.io.File xmlFile)
This method fetches the document-root(DOM) from a xml-document located on disc specified by user argument. |
static java.lang.String |
replaceSpecialCharacters(java.lang.String value)
This method replaces special character with their xml-counterpart. |
static java.lang.StringBuffer |
serializeDom(org.w3c.dom.Node node,
java.lang.StringBuffer writeString)
Serializes the DOM-tree to a stringBuffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLHelper()
| Method Detail |
|---|
public static java.lang.StringBuffer serializeDom(org.w3c.dom.Node node,
java.lang.StringBuffer writeString)
node - Node to start examining the tree from.writeString - The StringBuffer you want to fill with xml.
public static java.lang.String replaceSpecialCharacters(java.lang.String value)
public static org.w3c.dom.Document readDocumentFromFile(java.io.File xmlFile)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public static org.w3c.dom.Document readDocumentFromByteArray(byte[] xml)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||