|
|||||||||
| Home >> All >> com >> dghda >> [ kent overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.dghda.kent
Class XMLConstructor

java.lang.Objectcom.dghda.kent.XMLConstructor
- public class XMLConstructor
- extends java.lang.Object
This class provides methods useful for classes which want to construct or parse XML documents.
| Field Summary | |
private org.xml.sax.EntityResolver |
g_EntityResolver
|
| Constructor Summary | |
XMLConstructor()
|
|
| Method Summary | |
static void |
addAttribute(java.lang.StringBuffer buffer,
java.lang.String attr,
java.lang.String value)
|
static void |
addIndent(java.lang.StringBuffer buffer,
int indent)
|
static org.w3c.dom.Document |
createDocument(java.lang.String name)
Create a new document. |
static org.w3c.dom.Document |
createDocument(java.lang.String name,
java.lang.String dtd)
Create a new document using an internal DTD. |
static org.w3c.dom.Document |
createDocument(java.lang.String qualifiedName,
java.lang.String publicID,
java.lang.String systemID)
Create a new document using a DTD. |
protected static javax.xml.parsers.DocumentBuilder |
getDocBuilder()
|
static java.lang.String |
getNodeText(org.w3c.dom.Node elem)
Returns the contents of any text node children, concatenated together. |
static org.w3c.dom.Element |
getOptionalElementByTag(org.w3c.dom.Element elem,
java.lang.String tag)
Returns the single child element with the given tag, or null if there is no such element. |
static org.w3c.dom.Element |
getSingleElementByTag(org.w3c.dom.Element elem,
java.lang.String tag)
Returns the single child element with the given tag. |
static org.w3c.dom.Document |
parseDocument(java.lang.String doc)
Parse a new document. |
static org.w3c.dom.Document |
parseDocument(java.lang.String doc,
java.lang.String systemID)
Parse a new document with the given system ID. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
g_EntityResolver
private org.xml.sax.EntityResolver g_EntityResolver
| Constructor Detail |
XMLConstructor
public XMLConstructor()
| Method Detail |
parseDocument
public static org.w3c.dom.Document parseDocument(java.lang.String doc) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
- Parse a new document.
parseDocument
public static org.w3c.dom.Document parseDocument(java.lang.String doc, java.lang.String systemID) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
- Parse a new document with the given system ID.
createDocument
public static org.w3c.dom.Document createDocument(java.lang.String name) throws javax.xml.parsers.ParserConfigurationException
- Create a new document.
createDocument
public static org.w3c.dom.Document createDocument(java.lang.String name, java.lang.String dtd) throws javax.xml.parsers.ParserConfigurationException
- Create a new document using an internal DTD.
createDocument
public static org.w3c.dom.Document createDocument(java.lang.String qualifiedName, java.lang.String publicID, java.lang.String systemID) throws javax.xml.parsers.ParserConfigurationException
- Create a new document using a DTD.
getSingleElementByTag
public static org.w3c.dom.Element getSingleElementByTag(org.w3c.dom.Element elem, java.lang.String tag) throws org.xml.sax.SAXException
- Returns the single child element with the given tag.
getOptionalElementByTag
public static org.w3c.dom.Element getOptionalElementByTag(org.w3c.dom.Element elem, java.lang.String tag) throws org.xml.sax.SAXException
- Returns the single child element with the given tag, or null if there is no such element.
getNodeText
public static final java.lang.String getNodeText(org.w3c.dom.Node elem)
- Returns the contents of any text node children, concatenated together.
addIndent
public static void addIndent(java.lang.StringBuffer buffer, int indent)
addAttribute
public static void addAttribute(java.lang.StringBuffer buffer, java.lang.String attr, java.lang.String value)
getDocBuilder
protected static javax.xml.parsers.DocumentBuilder getDocBuilder() throws javax.xml.parsers.ParserConfigurationException
|
|||||||||
| Home >> All >> com >> dghda >> [ kent overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.dghda.kent.XMLConstructor