|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nl.justobjects.toolkit.xml.DOMUtil
Utility methods for working with a DOM tree. $Id: DOMUtil.java,v 1.16 2003/01/06 00:23:49 just Exp $
Constructor Summary | |
DOMUtil()
|
Method Summary | |
static void |
clearDocument(org.w3c.dom.Document document)
Clears all childnodes in document |
static void |
copyAttributes(org.w3c.dom.Element elementFrom,
org.w3c.dom.Element elementTo)
Copies all attributes from one element to another in the official way. |
static org.w3c.dom.Document |
createDocument()
Create empty document TO BE DEBUGGED!. |
static void |
document2File(org.w3c.dom.Document document,
java.lang.String fileName)
Write Document structure to XML file. |
static void |
expandIds(java.lang.String tag,
org.w3c.dom.Element targetDocument,
org.w3c.dom.Document contentDocument)
Expands |
static void |
expandIncludes(org.w3c.dom.Document document)
Expands |
static void |
expandIncludes(org.w3c.dom.Document document,
java.lang.String rootDir,
java.lang.String fileDir)
Expands |
static org.w3c.dom.Element |
getElementById(org.w3c.dom.Document document,
java.lang.String id)
|
static org.w3c.dom.Element |
getElementById(org.w3c.dom.Element element,
java.lang.String id)
|
static org.w3c.dom.Element |
getElementById(org.w3c.dom.NodeList nodeList,
java.lang.String id)
Get Element that has attribute id="xyz". |
static org.w3c.dom.Element |
getFirstElementByTagName(org.w3c.dom.Document document,
java.lang.String tag)
|
static void |
main(java.lang.String[] args)
|
static void |
p(java.lang.String s)
|
static org.w3c.dom.Document |
parse(java.lang.String uri)
Parses the specified URI without DTD validation and returns the document. |
static org.w3c.dom.Document |
parse(java.lang.String uri,
boolean validate)
Parses the specified URI and returns the document. |
static void |
printAsHTML(org.w3c.dom.Document document,
java.io.PrintWriter printWriter)
Prints an XHTML DOM as browser-compliant HTML |
static void |
printAsXML(org.w3c.dom.Document document,
java.io.PrintWriter printWriter)
Prints an XML DOM. |
static void |
replaceElement(org.w3c.dom.Element newElement,
org.w3c.dom.Element oldElement)
Replaces an element in document. |
private static void |
testCreateDocument()
|
private static void |
testReplaceElement()
|
private static void |
testXMLFile(java.lang.String fileName)
|
static void |
warn(java.lang.String s)
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public DOMUtil()
Method Detail |
public static void clearDocument(org.w3c.dom.Document document)
public static org.w3c.dom.Document createDocument()
public static void copyAttributes(org.w3c.dom.Element elementFrom, org.w3c.dom.Element elementTo)
public static void expandIds(java.lang.String tag, org.w3c.dom.Element targetDocument, org.w3c.dom.Document contentDocument)
public static void expandIncludes(org.w3c.dom.Document document)
public static void expandIncludes(org.w3c.dom.Document document, java.lang.String rootDir, java.lang.String fileDir)
public static org.w3c.dom.Element getFirstElementByTagName(org.w3c.dom.Document document, java.lang.String tag)
public static org.w3c.dom.Element getElementById(org.w3c.dom.Document document, java.lang.String id)
public static org.w3c.dom.Element getElementById(org.w3c.dom.Element element, java.lang.String id)
public static org.w3c.dom.Element getElementById(org.w3c.dom.NodeList nodeList, java.lang.String id)
public static org.w3c.dom.Document parse(java.lang.String uri, boolean validate) throws java.lang.Exception
public static org.w3c.dom.Document parse(java.lang.String uri) throws java.lang.Exception
public static void printAsHTML(org.w3c.dom.Document document, java.io.PrintWriter printWriter)
public static void printAsXML(org.w3c.dom.Document document, java.io.PrintWriter printWriter)
public static void replaceElement(org.w3c.dom.Element newElement, org.w3c.dom.Element oldElement)
public static void document2File(org.w3c.dom.Document document, java.lang.String fileName)
public static void warn(java.lang.String s)
public static void p(java.lang.String s)
private static void testCreateDocument()
private static void testReplaceElement()
private static void testXMLFile(java.lang.String fileName)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |