Вопрос

In my Android app, I am using a specific API which returns responses as XFORMS documents.

Since XFORM is a "normal" XML, can I use the standard Android parsers to parse its content?

Under the term usual, I am referring to XmlPullParser.

Это было полезно?

Решение

One of the purposes of standardizing XML is to ensure that any XML document can be parsed by any conforming parser, assuming that the parser understands the encoding used for the document. If the responses you are getting are really XForms documents, then they are necessarily well formed XML; if XmlPullParser is a conforming XML parser, then it will certainly be able to parse the XForms documents. If the parse does not succeed, you have evidence that either the document or the parser is non-conforming.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top