Dan, After some more debugging I realized that the problem is not the stax implementation but the XFire W3CDOMStreamReader class. The getPrefix() method returns "" in case of no prefix. This is not according the spec which says to return null in case of no prefix. After changing this behavior everything is fine. Can you please fix this?
Thanks Yves On Tue, 2006-11-14 at 11:06 +0800, Dan Diephouse wrote: > Hi Yves, > Thanks, I've reopened the issue and will commit the fix to SVN soon. > Regards, > - Dan > > Yves Langisch wrote: > > >Hi > > > >I'd like to reopen http://jira.codehaus.org/browse/XFIRE-351 as there > >are several STAX impl which don't handle prefixes correctly. This means > >that the getPrefix() method returns "" instead of null, causing > >following code to throw an exception: > > > >if (reader.getPrefix() != null) { e.setPrefix(reader.getPrefix()); } > > > >(snippet from XFIRE-351) > > > >As a workaround you can check for "" too: > > > >if (reader.getPrefix() != null && reader.getPrefix() != "") > >{ e.setPrefix(reader.getPrefix()); } > > > >(see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6472960 for > >example) > > > >With woodstox I can reproduce this behavior too. > > > >Thanks > >Yves > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
