Stop XmlPullParser from decoding characters Android



I am using XmlPullParser in android to parse an xml file. The output of this parsing is another xml file that I later feed into XStream (which also parses it). The problem I am facing is that the output of the first parsing converts the encoded characters into normal characters (e.g. & becomes just &).


How can I prevent XmlPullParser from decoding any encoded characters? I know defineEntityReplacementText() allows me to specify for a specific encoded character, but it doesn't make sense to do this for each one.


No comments:

Post a Comment