<span id="Label3"></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Since the previous article explained the network request, if do not explain the network analysis is not kind to ha, then I now talk about the network analysis</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Network parsing methods are generally: XML, json, html Three kinds of parsing, then I will now one by one to explain the basic usage of the various analytic methods</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.xml parsing</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">There are many options for parsing XML in iOS development, The iOS SDK provides Nsxmlparser and libxml2 two class libraries, plus a number of Third-party class libraries, such as tbxml, touchxml, kissxml, tinyxml, and Gdataxml. The question is which one should we choose?</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Parsing XML usually has two ways, DOM and SAX:</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> When the DOM parses the xml, it reads into the entire XML document and constructs a tree structure (node tree) that resides in memory, which can be retrieved from any XML node by traversing the tree structure to read its properties and Values. and, in general, you can query XML nodes directly with the help of Xpath.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> Sax Parsing xml, is based on the event notification mode, while reading the XML document side processing, do not have to wait for the entire document to be loaded before taking action, when the read parsing process encountered the need to handle the object, will be issued a notification to handle it.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Generally in the iOS platform, the more commonly used XML parsing class library has the following several:</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> nsxmlparser,http://developer.apple.com/library/ios/#documentation/cocoa/reference/foundation/classes/ nsxmlparser_class/reference/reference.html, which is a class library of Sax parsing xml, is included by default in the iOS SDK and is easier to use.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> libxml2,http://xmlsoft.org/, A set of Open-source libraries that are included in the iOS SDK by default, is a c-based api, so it might not be as easy to use as Nsxml. This class library supports both DOM and sax parsing, LIBXML2 sax parsing mode is very cool, because it can read edge parsing, especially in downloading a large XML file from the internet, you can download the content on the side of the download to parse, greatly improve the resolution EFFICIENCY.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> Tbxml,http://www.tbxml.co.uk/tbxml/tbxml_ free.html, which is a lightweight Dom-style XML parsing class library, has good performance and low memory footprint, but it does not validate XML format, does not support xpath, and only supports parsing, and does not support modification of XML.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> touchxml,https://github.com/touchcode/touchxml, which is also a set of Dom-style XML parsing class libraries that support XPath and do not support XML Modification.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> kissxml,http://code.google.com/p/kissxml/, This is a set of XML parsing class libraries based on touchxml, which supports XML modification compared to Touchxml.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> tinyxml,http://www.grinninglizard.com/tinyxml/, This is a small set of c-based DOM methods for XML parsing of the class library, support for XML reading and modification, does not directly support xpath, It is necessary to use another related class library Tinyxpath to support Xpath.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> gdataxml,http://code.google.com/p/gdata-objectivec-client/source/browse/trunk/source/xmlsupport/, This is a set of google-developed DOM Way XML parsing class library, support to read and modify XML documents, support XPath query.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> So how do you choose the right XML parsing class library in your project? Some of these XML libraries have been analyzed and compared on the internet, so refer to the "how to Choose" best XML Parser for Your iPhone Project http://www.raywenderlich.com/553/ How-to-chose-the-best-xml-parser-for-your-iphone-project a article, basically more accurate and objective, the article suggests:</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> If you are reading very small XML documents, there is basically no difference in performance, but it is recommended to use touchxml, kissxml, or gdataxml from the convenience of Invocation.</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> If you need to read and modify an XML document, it is recommended that you use Gdataxml</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> If you need to read very large XML documents, it is recommended that you use Tbxml</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><span style="white-space:pre"></span>· <span style="white-space:pre"></span> If you don't want to call a Third-party class library, you can also use Nsxmlparser</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.1 Parsing XML using Nsxmlparser</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Read start tag</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">-(void) parser: (nsxmlparser *) parser didstartelement: (nsstring *) elementname namespaceuri: (nsstring *) NamespaceURI Qualifiedname: (nsstring *) qName attributes: (nsdictionary *) attributedict</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Get label text content</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">-(void) parser: (nsxmlparser *) parser foundcharacters: (nsstring *) string</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Get tag byte content</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">-(void) parser: (nsxmlparser *) parser foundcdata: (nsdata *) cdatablock</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Read end tag</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">-(void) parser: (nsxmlparser *) parser didendelement: (nsstring *) elementname namespaceuri: (nsstring *) NamespaceURI Qualifiedname: (nsstring *) QName</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2 Parsing XML using Gdataxml</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.1 Importing a source file (4 files)</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.2 Selected Items (Targets), Select Build settings->all->search Paths</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">->header Search paths-> Add a "/usr/include/libxml2"</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.3 Setting source file does not support Arc----fno-objc-arc</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.4 Import frame, Libxml2.dylib</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.5 Import Header File</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">#import "GDataXMLNode.h"</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.2.6 Use</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">converting XML content to document objects</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Gdataxmldocument *document = [[gdataxmldocument alloc] initwithdata:data options:0 error:nil];</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Get root node</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Gdataxmlelement *rootelement = document.rootelement;</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Some methods</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Children get all the child nodes</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Elementsforname: gets all the corresponding nodes according to the specified node name</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Name Gets the node name</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">StringValue getting node content</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Nsarray *items = [rootelement nodesforxpath:@ "//item" error:nil]; Get all item nodes based on XPath syntax</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3 Parsing XML using Tbxml</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.1 Importing a source file (6 files)</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.2 Selected Items (Targets), Select Build settings->all->search Paths</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">->header Search paths-> Add a "/usr/include/libxml2"</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.3 Setting source file does not support Arc----fno-objc-arc</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.4 Import frame, libxml2.dylib, libz.dylib</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.5 Import Header File</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">#import "TBXML.h"</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">1.3.6 Use</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">converting XML content to document objects</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">TBXML *tbxml = [[TBXML alloc] initwithxmldata:data error:nil];</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Get root node</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Tbxmlelement *rootelement = tbxml.rootxmlelement;</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Some methods</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">[TBXML elementname:rootelement] Get node name</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">[TBXML textforelement:titelement] Get node content</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">[TBXML childelementnamed:@ "channel" parentelement:rootelement]; Gets the child nodes of the specified name according to the parent node</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">[TBXML nextsiblingnamed:@ "item" searchfromelement:itemelement]; Query the next same node based on the node name</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">2.json parsing full name: JavaScript Object Notation</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Definition of 2.1 JSON</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Data in Name/value pairs</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Data is separated by commas</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Curly braces Save Object</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Square brackets Save Array</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">Get the Data: the value of the NSData type that is obtained through the network request, if still do not understand can go to view my previous post iOS network Request)</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">ID obj = [nsjsonserialization jsonobjectwithdata:data options:nsjsonreadingmutablecontainers error:nil];</p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘; min-height:12px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘"><p style="margin-top:0px; margin-bottom:0px; font-family:‘Heiti SC Light‘">3.html parsing (less use, no explanation) commonly used: tfhpple</p></p><p><p>IOS Network parsing</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service