|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.reload.dweezil.util.XMLUtils
Some useful XML Utilities that leverage the JDOM Package
Field Summary | |
static java.lang.String |
DEFAULT_SAX_DRIVER_CLASS
The default Sax Parser that JDOM will use. |
Constructor Summary | |
XMLUtils()
|
Method Summary | |
static boolean |
getElementByNameValuePair(java.lang.String rootName,
DomPath domPath,
java.io.File xmlFile,
java.lang.String value)
Gets the an element using domPath and its value |
static java.lang.String |
getElementValueByName(java.lang.String rootName,
DomPath domPath,
java.io.File xmlFile)
Gets the value of an element from its name |
static java.util.ArrayList |
getElementValuesFromFileByName(java.io.File source,
java.io.File stylesheet)
Gets all values of a particular element using its name from the file |
static boolean |
getFileByNameValuePair(java.lang.String rootName,
DomPath domPath,
java.io.File xmlFile,
java.lang.String value)
Identifies the file using domPath and its value |
static java.io.File |
getMetadataFile(java.io.File source,
java.io.File stylesheet,
java.lang.String filename)
Gets the metadata file |
static org.jdom.Document |
readXMLFile(java.io.File file)
Reads and returns a JDOM Document from file without Schema Validation |
static org.jdom.Document |
readXMLFile(java.io.File file,
java.lang.String schemaNamespace,
java.lang.String schemaLocation)
Reads and returns a JDOM Document from file with Schema validation |
static void |
write2XMLFile(org.jdom.Document doc,
java.io.File file)
Writes a JDOM Document to file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String DEFAULT_SAX_DRIVER_CLASS
Constructor Detail |
public XMLUtils()
Method Detail |
public static void write2XMLFile(org.jdom.Document doc, java.io.File file) throws DweezilXMLException
doc
- The JDOM Document to writefile
- The file to write to
DweezilXMLException
- If there is any problempublic static org.jdom.Document readXMLFile(java.io.File file, java.lang.String schemaNamespace, java.lang.String schemaLocation) throws DweezilXMLException
file
- The XML FileschemaNamespace
- The Schema Target NamespaceschemaLocation
- The Schema Location
DweezilXMLException
- If there is any problempublic static org.jdom.Document readXMLFile(java.io.File file) throws DweezilXMLException
file
- The XML File
DweezilXMLException
- If there is any problempublic static java.lang.String getElementValueByName(java.lang.String rootName, DomPath domPath, java.io.File xmlFile) throws DweezilXMLException
rootName
- the name of the documents root elementdomPath
- the domPath of the element concernedxmlFile
- the XML file of the document concerned
DweezilXMLException
public static boolean getElementByNameValuePair(java.lang.String rootName, DomPath domPath, java.io.File xmlFile, java.lang.String value) throws DweezilXMLException
rootName
- the name of the documents root elementdomPath
- the domPath of the element concernedxmlFile
- the XML file of the document concernedvalue
- the value of the element we are searching for
DweezilXMLException
public static boolean getFileByNameValuePair(java.lang.String rootName, DomPath domPath, java.io.File xmlFile, java.lang.String value) throws DweezilXMLException
rootName
- the name of the documents root elementdomPath
- the domPath of the element concernedxmlFile
- the XML file of the document concernedvalue
- the value of the element we are searching for
DweezilXMLException
public static java.util.ArrayList getElementValuesFromFileByName(java.io.File source, java.io.File stylesheet) throws DweezilXMLException
source
- the XML filestylesheet
- the XSLT stylesheet to be used for transformations and obtaining data
DweezilXMLException
public static java.io.File getMetadataFile(java.io.File source, java.io.File stylesheet, java.lang.String filename) throws DweezilXMLException
source
- the XML filestylesheet
- the XSLT stylesheet to be used for transformations and obtaining datafilename
- the filename to be used for the metadata file
DweezilXMLException
|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |