Android : Reading XML from local resource (for testing)

后端 未结 3 774
面向向阳花
面向向阳花 2020-12-06 07:08

I\'m writing an app which will read XML from a webservice (probably via kSOAP2). I\'m fairly happy with SAX parsing, as I\'ve done XML parsing iPhone apps.

Unfortu

3条回答
  •  有刺的猬
    2020-12-06 07:39

    Raises exception due to incorrectly formed XML (line1,Pos0).

    You tell parser that the encoding is UTF-8 and if it isn't you may get various errors (depending on parsers). If you are using non-xml editor to edit your XML it may save the file in a different encoding regardless what you declared it to be in the XML document.

提交回复
热议问题