ios - Query a xml file from a url -
in ios application project have string holds address , given url of xml file holds list of addresses , precinct locations so:
<?xml version=”1.0” encoding=”utf-8”?> <root> <row> <res_street_address>448 ivy yokeley rd</res_street_address> <res_city_desc>winston-salem</res_city_desc> <state_cd>nc</state_cd> <zip_code>27101</zip_code> <precinct_desc>gumtree # 16</precinct_desc> </row>
this file large , takes long time load in browser. job find precinct location given address in app. have been @ days , i’m @ wits end. i’ve found far leads me believe have download file first , parse it. file large , slow app down. there way can query on records in xml file , download results? i’ve tried
https://thewebaddress/voter.xml/?res_street_address=”448 ivy yokely rd”&res_city_desc=”winston-salem”…
but i’ve found isn’t way this. have little experience web technologies, lot of find online on head. best way go this?
you can't natively xml file.
a xml file purely data , contains no 'programming' fulfil search request. work xml have download it. (you can work byte stream , sax based xml parser , download as needs find result... thats small optimisation , not worth trouble imo)
point is: data want work has loaded
(a way install script (php/asp/whatever) have scan xml on server side , serve relevant xml parts) [i recommend if can. saves cpu & bandwidth -> time & battery
Comments
Post a Comment