I am trying to get the distance between two places (across the roads) and I get that the HTTP request will return XML with the following data
http://code.google.com/apis/maps/documentation/directions/#XML
but I don’t understand how to use NSXMLParser to get the total distance. I suggest using
parser:didStartElement:namespaceURI:qualifiedName:attributes
but not sure how it works. The element that I need, I think, is the "direction", but there are a couple of such elements. How to specify which one I want? Is this related to the "attributes" parameter?
NSXMLParser SAX, , . Google, , , , SAX.
NSXMLParser
DOM, NSXMLDocument, , , , Apple NSXMLDocument SDK iOS. , TouchXML.
NSXMLDocument
, , XPath : //leg/step/distance/value. .
//leg/step/distance/value
didStartElement , , foundCharacters ( ), didEndElement .
Source: https://habr.com/ru/post/1766599/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1766594/adding-3rd-party-libraries-to-visual-studio-source-control&usg=ALkJrhhwYT7B1ggNM2lGhPQ9mSUTmg41JQis the constant part of the memory reserved using the xmx parameter? - javaError C2079, what is the order of class definition in - c ++How to debug events on a page using jQuery - javascriptПроблемы со словом SSRS 2008 - sql-serverIs graphics better than Google graphics? - c ++No BlackBerry JRE installed? - blackberry-eclipse-pluginHow to implement publishing / subscribing to communication over the Internet - c #Create a line graph for any test? - performance"private` split 'method called "- ruby | fooobar.comAll Articles