JSR 172 XML parser in WTK 2.5: problems compared to 2.2

Hi,

I'm experiencing 2 problems with the WTK 2.5 JSR 172 XML parser that do not occur with:

-WTK 2.2

-Sony-Ericsson Emulator WTK2

-Sony-Ericsson devices.

They are:

- attributes.getLocalName(i) always returns an empty string

- documents with multiple roots cause a parser panic

Anyone has a hunch?

Thanks a lot,

Philippe

Message was edited by:

philippelaporte

Message was edited by:

philippelaporte

[491 byte] By [philippelaportea] at [2007-11-27 1:24:05]
# 1

> - attributes.getLocalName(i) always returns an empty

> string

are you sure that "Namespace processing is performed"?

> - documents with multiple roots cause a parser panic

if you use the [url=http://jakarta.apache.org/commons/digester/]Digester[/url], you will see that multiple roots cause org.xml.sax.SAXParseException and it is normal!!!

an XML document MUST NOT have multiple roots!

suparenoa at 2007-7-12 0:14:43 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

>> - attributes.getLocalName(i) always returns an empty

>> string

>are you sure that "Namespace processing is performed"?

I tried:

parserFactory.setFeature("http://xml.org/sax/features/namespace-prefixes", true);

-> still the same

Then I tried:

parserFactory.setFeature("http://xml.org/sax/features/namespaces", true);

with this I get an exception when I try to create a parser.

>> - documents with multiple roots cause a parser panic

>if you use the Digester, you will see that multiple roots cause >org.xml.sax.SAXParseException and it is normal!!!

>an XML document MUST NOT have multiple roots!

I know. So what you're saying is they fixed a bug...

Still, since devices and the WTK 2.2 doesn't have it, I was hoping there might be a backwards-compatiblity mode.

I am trying to use the XML parser to parse a small HTML subset. If at least the panic Exception reported the position in the stream, maybe I could just start parsing again from there.

The point is, why has ist changed, and will the change move to all implementations.

Thanks,

Philippe

philippelaportea at 2007-7-12 0:14:43 > top of Java-index,Java Mobility Forums,Java ME Technologies...