public class RegistryImporter
extends java.lang.Object
| Constructor and Description |
|---|
RegistryImporter() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getElementData(org.w3c.dom.Node parentElement,
java.lang.String childName)
Get the CDATA of a particular element.
|
static java.lang.String[] |
getRepeatedElementData(org.w3c.dom.Node parentElement,
java.lang.String childName)
Get repeated CDATA for a particular element.
|
static org.w3c.dom.Document |
loadXML(java.lang.String filename)
Load in the XML from file.
|
public static org.w3c.dom.Document loadXML(java.lang.String filename)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
filename - the filename to load fromjava.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic static java.lang.String getElementData(org.w3c.dom.Node parentElement,
java.lang.String childName)
throws javax.xml.transform.TransformerException
<foo><mimetype>application/pdf</mimetype></foo>
passing this the foo node and mimetype will
return application/pdf.
parentElement - the element, whose child element you want the CDATA fromchildName - the name of the element you want the CDATA fromStringjavax.xml.transform.TransformerExceptionpublic static java.lang.String[] getRepeatedElementData(org.w3c.dom.Node parentElement,
java.lang.String childName)
throws javax.xml.transform.TransformerException
<foo>
<bar>val1</bar>
<bar>val2</bar>
</foo>
passing this the foo node and bar will
return val1 and val2.
parentElement - the element, whose child element you want the CDATA fromchildName - the name of the element you want the CDATA fromStringjavax.xml.transform.TransformerExceptionCopyright © 2013 DuraSpace. All Rights Reserved.