Saturday, October 26, 2013

XML from a remote database

UWS uses an XML format data file, hosted on the internet. To help me with this, I went to the site of Lars Vogel. Thank you please, Lars. First, you have to chose a built in parser

" The Java programming language provides several standard libraries for processing XML files. The SAX and the DOM XML parsers are also available on Android.
The SAX and DOM parsers API is on Android the same as in standard Java. SAX and DOM have their limitations, therefore it is not recommended to use them on Android. Therefore this tutorial does not give an example for the usage of this library.
The Java standard provides also the Stax parser. This parser is not part of the Android platform.
Android provides for XML parsing and writing the XmlPullParser class. This parser is not available in standard Java but is similar to the Stax parser. The parser is hosted at .
On Android it is recommended to use the XmlPullParser. It has a relatively simple API compared to SAX and DOM and is fast and requires less memory then the DOM API."

With one of these parsers ready, add the permission to open external web pages, then point your parser to the page you want! I made my page very simple, with only XML data. 

No comments:

Post a Comment