public class RegistryImporter extends Object
| Constructor and Description |
|---|
RegistryImporter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getElementData(Node parentElement,
String childName)
Get the CDATA of a particular element.
|
static String[] |
getRepeatedElementData(Node parentElement,
String childName)
Get repeated CDATA for a particular element.
|
static Document |
loadXML(String filename)
Load in the XML from file.
|
public static Document loadXML(String filename) throws IOException, ParserConfigurationException, SAXException
filename - the filename to load fromIOException - if IO errorParserConfigurationException - if configuration parse errorSAXException - if XML parse errorpublic static String getElementData(Node parentElement, String childName) throws 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 fromStringTransformerException - if errorpublic static String[] getRepeatedElementData(Node parentElement, String childName) throws 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 fromStringTransformerException - if errorCopyright © 2022 LYRASIS. All rights reserved.