I am trying to convert xml data in wbxml and the reverse too via my program. When I was searching in google, I found the following link was querying the same.
https://stackoverflow.com/questions/5088507/i-there-any-library-xml2wbxml-wbxml-for-iphone.
But, as per the answer, it doesn't have any sample source which converts between xml and wbxml data.
Can someone please guide me to get some referral code which converts between xml and wbxml data?
Maybe this can help you:
http://wbxmllib.sourceforge.net/html/files.html
http://wbxmllib.sourceforge.net/html/wbxml2xml__tool_8c-source.html
http://wbxmllib.sourceforge.net/html/xml2wbxml__tool_8c-source.html
Related
I'm trying to read external data with REST API as in this tutorial.
https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/get-weather-using-rest-api-call/
The problem is that my server answers with XML text and not with a JSON payload.
For this reason, the (blue) Script node within RuleChain does not accept the input and I cannot parse the XML text.
Does anyone know how to get around the problem? Should I use some other node? Or is there no solution?
Thank you.
I am using http://datamine.mta.info/list-of-feeds api to get GTFS data for United States transportation.
When you call http://datamine.mta.info/mta_esi.php?key=<key>&feed_id=1 api you get one "gtfs" file which contains data that I need to parse in iOS so that I can display.
Once I get the file, how do I parse it? So far I haven't found a way to do so. Anyone can help me on this?
Thanks,
Pratik
The MTA requires that you serve the realtime data from your own server, so you might as well parse the Protocol Buffers server-side, and then make your data available to your iOS app from your server. If you do it that way, then you can use e.g., a Python or C++ library to parse the PB into JSON or whatever and structure it in an optimal way for your app for download.
I get an XML file with a huge amount of data. I would like to add some entries to it. I have looked at GDataXML and a few others but cant seem to find something that will allow me to add entries without having to fully map the XML and then reconstruct it. What is a simple way to get this done?
As you have looked at GDataXML and don't want to go for it, then TouchXML could be a nice alternative. Here is a good tutorial on how to use TouchXML here.
I want to parse this RSS (from a bit.ly user stream) to grab all bit.ly links and related data, and store all new items into a database. What are examples of easy ways to parse RSS (e.g. simple helpers with small footprint)? I'm a Code Igniter rookie, so please be gentle :)
I ended up by simply using json_decode(file_get_contents('http://bitly.com/u/joaoramos.json')); and then dug into the object to get what I needed.
Check out SimplePie. Integrating this in CI , shouldn't be hard .
Or If you want one with less foot print, check this Thread on CI forums , This is very light and does the job.
I am currently testing how to combine ios, php, mysql and xml. So far I have set up a database, got my php scripts working and am using them to request data from my external mysql database that then returns the results to my app using ASIHTTPRequest network wrappers.. what I am now trying to do is parse the xml that I am generating with my php scripts, Its a pretty easy example my php looks a little something like this
<?xml version="1.0"?>
<entries>
<code>3237554</code>
</entries>
All I am looking to parse is that number, In the past I have use NSXMLParse from the objective-c library however I was calling everything from an rss feed so the set up to acquiring the data was entirely different as it was not self generated etc. Due to the fact that I am using ASIHTTPRequest I am taking a guess here 'that I would hopefully like you to help me with' is that I should be grabbing my xml in
- (void)requestFinished:(ASIHTTPRequest *)request
which is pretty obvious because I am grabbing just basic text output from there as it is now.. So my question is what is the best way to start parsing this text thats coming in? is there a special xml parser library I am not aware of or can I use NSXMLParser some how?
//EDIT:: Working solution here
If the size of the returned xml is not that big, libxml2 is a nice convenient solution that I have used effectively.
Take a look at Matt's blog here --
http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html