|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aeonscope.xml.JDOMKit
public class JDOMKit
General JDOM utilities for XML manipulation.
| Constructor Summary | |
|---|---|
JDOMKit()
|
|
| Method Summary | |
|---|---|
static String |
getAttributeValue(String name,
org.jdom.Element element)
Answers the attribute value for an element and attribute name. |
static org.jdom.Document |
getDocument(String path)
Answers a document for the given file path with no XML to DTD validation. |
static org.jdom.Document |
getDocument(String path,
boolean validate)
Answers a document for the given file path with the option to validate the XML against the DTD. |
static org.jdom.Element |
getRootElement(String path)
Answers the root element of a given XML file with no XML to DTD validation. |
static org.jdom.Element |
getRootElement(String path,
boolean validate)
Answers the root element of a given XML file with the option to validate the XML against the DTD. |
static void |
print(org.jdom.Document doc)
Prints the document to the system console. |
static void |
print(org.jdom.Element element)
Prints an element to the system console. |
static void |
print(List<org.jdom.Element> elements)
Prints an element list to the system console. |
static void |
transform(String xmlPath,
String outputPath)
Transforms an XML file into a new file (assumes the XSLT file is referenced in the XML). |
static void |
transform(String xmlPath,
String xsltPath,
String resultPath)
Transforms the given XML file using the given XSLT file into a new file (based on the given file path). |
static void |
write(org.jdom.Document doc,
File file)
Writes a document to a file. |
static void |
write(org.jdom.Document doc,
OutputStream stream)
Writes a document to an output steam. |
static void |
write(org.jdom.Document doc,
String path)
Writes a document to a file path. |
static void |
write(org.jdom.Element root,
Collection producers,
String path)
Writes a given root element by adding the collection of element producers to a given file path. |
static void |
write(org.jdom.Element element,
File file)
Writes an element to a file. |
static void |
write(org.jdom.Element element,
OutputStream stream)
Writes an element to an output steam. |
static void |
write(org.jdom.Element element,
String path)
Writes an element to a file path. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDOMKit()
| Method Detail |
|---|
public static org.jdom.Document getDocument(String path,
boolean validate)
path - The file path of the XML file.validate - true = perform validation, false = do
not validate.
public static org.jdom.Document getDocument(String path)
path - The file path to the XML file.
public static org.jdom.Element getRootElement(String path)
path - The path to the XML file.
public static org.jdom.Element getRootElement(String path,
boolean validate)
path - The path to the XML file.validate - true = perform validation, false = do
not validate.
public static String getAttributeValue(String name,
org.jdom.Element element)
name - The name of the attribute to search for.element - The element to acquire the attribute value from.
public static void transform(String xmlPath,
String xsltPath,
String resultPath)
xmlPath - The file path of the XML file to transform.xsltPath - The file path of the XSLT file to do the transforming.resultPath - The file path of the result file created from the transform.
public static void transform(String xmlPath,
String outputPath)
xmlPath - The XML file path.outputPath - The output file path.public static void print(org.jdom.Element element)
element - The element to print.public static void print(List<org.jdom.Element> elements)
elements - The list of elements to print.public static void print(org.jdom.Document doc)
doc - The document to print.
public static void write(org.jdom.Element element,
String path)
element - The element to write.path - The file path to write to.
public static void write(org.jdom.Element element,
File file)
element - The element to write.file - The file to write to.
public static void write(org.jdom.Element root,
Collection producers,
String path)
root - The root element.producers - The collection of element producers to add to the root
element.path - The path to create the XML file at.
public static void write(org.jdom.Element element,
OutputStream stream)
element - The element to write.stream - The output stream to write to.
public static void write(org.jdom.Document doc,
String path)
doc - The document to write.path - The file path to write to.
public static void write(org.jdom.Document doc,
File file)
doc - The document to write.file - The file to write to.
public static void write(org.jdom.Document doc,
OutputStream stream)
doc - The document to write.stream - The output stream to write to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||