Hi Alistair, I'm not sure why you can't parse the xml. I've looked at this a bit more and it seems that the Oracle parser is reporting the xml delcaration as a Processing Instruction. It never occurred to me but I guess that the xml declaration does follow the PI format. So, I guess the question is, is it a PI or isn't it?
-jason --- Alistair Young <[EMAIL PROTECTED]> wrote: > > <?xml version="1.0" encoding="UTF-8" ?> > using xerces through JAXP, if this line is present, > I get a SAXException > every time when parsing the doc, along the lines of > xml element not > allowed here. I have to remove the line before the > doc will parse. > Am I missing something? > > thanks, > Alistair > > > -- > Alistair Young > Senior Software Engineer > [EMAIL PROTECTED] M�r Ostaig > Isle of Skye > Scotland > > > Hello, > > > > Consider the following xml snippet: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <foo TYPE="bar"> > > </foo> > > > > I have some code which uses a jaxp DocumentBuilder > to > > parse this xml and then walk to tree and do > various > > things. This code works fine with xerces (1.4.x > and > > 2.2.x) but when it's deployed in the Oracle 10g > > application server which uses it's own jaxp > > implementation there are problems. It turns out > that > > the xerces Document resulting from the parse has > only > > one child which is the 'foo' element while the > Oracle > > Document has two - the first is the xml > declaration > > and the second is the 'foo' element. > > > > Obviusly I can code around this easily enough but > I'm > > wondering which behavior is correct with respect > to > > the standard or if the standard even applies. > > Possibly the implemenations are free to make > whichever > > choice they want? Thanks in advance. > > > > -jason > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Read only the mail you want - Yahoo! Mail > SpamGuard. > > http://promotions.yahoo.com/new_mail > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
