XmlPullParserException parsing attribute containing the object

I am using kXML2 in an obsolete JavaME project. I get XML where some attributes contain encoded entites. When I get this attribute value with a call:

parser.getAttributeValue

It throws an exception:

XmlPullParserException: unresolved

I downloaded the latest version of this analyzer, but it still shows this behavior.

If I delete a problem string from XML, then there are no errors.

+3
source share
1 answer

Ok, here's what happens:

The parser should decode the objects in the attributes if you do not set this property:

parser.setFeature(KXmlParser.FEATURE_PROCESS_DOCDECL, true);

. , , , pull-parser , .

"" , :

parser.defineEntityReplacementText("Ntilde", "Γ‘");

.

+2

All Articles