Hello,

I am sending the exact same XML message through
an input stream instead of a file, and getting the following
errors (SAXParsException):

Document root element is missing.

Here is the code:
// p_sMessage is a String that contains the entire contents
// of the file aeMessage.xml

DocumentBuilder builder = factory.newDocumentBuilder();
ByteArrayInputStream is=new ByteArrayInputStream(
                                                p_sMessage.getBytes());
m_document =builder.parse(is);
// you now have a dom compliant Document Object

/* THIS WORKS HERE
m_document = builder.parse( new File("C:\\joel\\samples\\xml-dom\\aeMessage.xml") );
*/


Can someone please assist?
ENV: jdk1.3, xerces.jar (I believe from sun???), on Windows XP (or 2k)

Thanks,
Joel
--
President / Sr. Engineer
RHINO Systems Inc.
Consulting For Your Business
Project Manager &
    Programmer {JAVA & J2EE,ORACLE,HTML & JAVASCRIPT,
               UNIX,C/C++, ESRI-GIS, SMART CARDS}
http://www.rhinosystemsinc.com
530-888-6248 x205
650-366-5885 x205


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to