I tried altering the MySql Example to test out HttpUtils2 on whether I could connect to the xml database but ended up getting an error: An error has occured in sub: java.lang.RuntimeException: JSON Array expected. Continue?You should use HttpUtils2 to download the file and parse it.
Thanks for providing an alternative method to handle this issue. The example you provided shows how the method BuildFromString is used, how do you use the method BuildFromURL?Or use XOM.
The XOMBuilder object has a method BuildFromURL which will retrieve your remote XML file.
Once retrieved you can use XOM to parse it.
Why? It has nothing to do with this.I tried altering the MySql Example to test out HttpUtils2
My main goal is to connect to a database that is already being used for a website (as in creating an app for a website) but haven't had much luck connecting directly to that database. So we are trying another means of viewing the data within the database which is connect to an xml file generated by the website since we thought that might be an easier solution. Sorry for the confusion.Why? It has nothing to do with this.
First download the string: http://www.b4x.com/android/forum/threads/18992/#content
Then you need to parse it with SaxXml (or XOM).
There a code example here that shows the syntax to use:The example you provided shows how the method BuildFromString is used, how do you use the method BuildFromURL?