Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Does it mean source and result should both be either DOM or Stream or SAX and not mixed? >Thread Next - Re: Does it mean source and result should both be either DOM or Stream or SAX and not mixed? Re: Does it mean source and result should both be either DOM or Stream or SAX and not mixed?To: NULL Date: 3/1/2007 12:45:00 PM
moralbarometer wrote:
> the code below shows how i created the DOMSource
> Is there any error in it?
> thx
>
> InuputStream confiXML=StreamSource(Thread.currentThread().getClass()
> .getClassLoader().getResourceAsStream("de/
> SOAP.xml"));
>
> DocumentBuilderFactory
> documentBuilderFactory=DocumentBuilderFactory.newInstance();
// Add this line. (Arguably should be the default these days, but
// generally isn't for historical reasons of compatability with
// ancient code.)
documentBuilderFatory.setNamespaceAware(true);
> DocumentBuilder
> documentBuilder=documentBuilderFactory.newDocumentBuilder();
> Document document=documentBuilder.parse(confiXML);
> DOMSource domSource=new DOMSource(document);
--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
