|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.ei.txnhandler.dataformat.xml.XMLDataFormatHelper
public class XMLDataFormatHelper
The XMLDataFormatHelper class provides the functionality for a user to transform an XML source using a style sheet.
Constructor Summary | |
---|---|
XMLDataFormatHelper(File xmlFile)
Constructor taking in a file. |
|
XMLDataFormatHelper(String xmlString)
Constructor taking in an a String consisting of XML. |
|
XMLDataFormatHelper(Vector dataPackets)
Constructor taking in a vector of data packets. |
Method Summary | |
---|---|
static String |
documentToString(Document doc)
This method converts a DOM Document to a String |
void |
format(String xslSource,
Result result)
This method applies the XSL to to XML source and outputs the result in the Result object. |
static String |
getFileContent(String fileName)
This method reads the contents of a file and returns it as a String. |
Document |
getXmlDocument()
Returns the xmlDocument. |
void |
setXmlDocument(Document document)
Sets the xmlDocument. |
static Document |
StringToDocument(String string)
This method converts a String to DOM Document |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLDataFormatHelper(Vector dataPackets) throws ProcessingErrorException
dataPackets
- the Vector of DataPackets
ProcessingErrorException
- if processing failspublic XMLDataFormatHelper(String xmlString) throws ProcessingErrorException
xmlString
- the XML string
ProcessingErrorException
- if processing failspublic XMLDataFormatHelper(File xmlFile) throws ProcessingErrorException
xmlFile
- the XML file
ProcessingErrorException
- if processing failsMethod Detail |
---|
public void format(String xslSource, Result result) throws ProcessingErrorException
xslSource
- Stringresult
- the Result object where the tansformation is stored
ProcessingErrorException
- if processing failspublic static String getFileContent(String fileName) throws ProcessingErrorException
fileName
- the file from which to read
ProcessingErrorException
- if processing failspublic Document getXmlDocument()
public void setXmlDocument(Document document)
document
- The document to setpublic static String documentToString(Document doc) throws ProcessingErrorException
doc
- the Document object
ProcessingErrorException
- if processing failspublic static Document StringToDocument(String string) throws ProcessingErrorException
string
- the XML String
ProcessingErrorException
- thrown if an error occurs during transformation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |