|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.gov.nehta.vendorlibrary.common.DOMUtil
public final class DOMUtil
DOMUtil
provides utility classes for converting a XML document to DOM
instance and vice versa.
Method Summary | ||
---|---|---|
static
|
getDocumentElementFromInstance(java.lang.Class instanceClass,
java.lang.String qName,
java.lang.String className,
T object)
Obtains the Element instance for the provided AJX instance. |
|
static org.w3c.dom.Element |
getDocumentElementFromXML(java.lang.String xmlSource)
Returns the provided XML source as Element . |
|
static
|
getDocumentFromInstance(java.lang.Class instanceClass,
java.lang.String qName,
java.lang.String className,
T object)
Obtains the Document instance for the provided AJX instance. |
|
static org.w3c.dom.Document |
getDocumentFromXML(java.lang.String xmlSource)
Returns the provided XML source as Document . |
|
static java.lang.String |
serialiseToString(org.w3c.dom.Document xmlDoc)
Converts the provided Document into a XML data string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.w3c.dom.Element getDocumentElementFromXML(java.lang.String xmlSource)
Element
.
xmlSource
- the XML document source as String
Element
instance for the provided XML Sourcepublic static org.w3c.dom.Document getDocumentFromXML(java.lang.String xmlSource)
Document
.
xmlSource
- the XML document source as String
Document
instance for the provided XML Sourcepublic static <T> org.w3c.dom.Element getDocumentElementFromInstance(java.lang.Class instanceClass, java.lang.String qName, java.lang.String className, T object) throws javax.xml.bind.JAXBException
Element
instance for the provided AJX instance.
T
- the JAXB generic type for marshallinginstanceClass
- the JAXB object classqName
- of the element elementclassName
- local classname for the JAXB object [Non- fully qualified
class name]object
- the JAXB instance to be marshalled to Element
Document
instance for the marshalled JAXB instance
javax.xml.bind.JAXBException
- in an event of error.public static <T> org.w3c.dom.Document getDocumentFromInstance(java.lang.Class instanceClass, java.lang.String qName, java.lang.String className, T object) throws javax.xml.bind.JAXBException
Document
instance for the provided AJX instance.
T
- the JAXB generic type for marshallinginstanceClass
- the JAXB object classqName
- of the element elementclassName
- local classname for the JAXB object [Non- fully qualified
class name]object
- the JAXB instance to be marshalled to Document
Document
instance for the marshalled JAXB instance
javax.xml.bind.JAXBException
- in an event of error.public static java.lang.String serialiseToString(org.w3c.dom.Document xmlDoc) throws javax.xml.transform.TransformerException, java.io.IOException
Document
into a XML data string.
xmlDoc
- the document object
{@link
- TransformerException}, IOException
in an event of error.
javax.xml.transform.TransformerException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |