Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java class and Coldfusion 5

Status
Not open for further replies.

casperovjp

Programmer
Jun 30, 2002
18
FR
I'm trying to parse an XML string into a XMLDoc (so I could transform it using an XSL doc).... I was able to do it with a XML File but a XML string... I found out that I need an InputSource and a String Reader... But I don't know how to put them together....

Here is the first part of the code....

transformerFactory = createObject("java", "javax.xml.transform.TransformerFactory");
factory = transformerFactory.newInstance();

DocumentBuilderFactory = createObject("java", "javax.xml.parsers.DocumentBuilderFactory");
docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilder = docBuilderFactory.newDocumentBuilder();
InputSource=createObject("java","org.xml.sax.InputSource");
StringReader=createObject("java","java.io.StringReader");

/* this is the problem */
xmlDoc = docBuilder.parse(InputSource(StringReader(#tempxml#)));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top