I. xml: an open-source parsing class, gdataxmlnode (add it to the project), and add the libxml2.dylib framework
Frequently used methods:
1.-(ID) initwithxmlstring :( nsstring *) STR options :( unsigned INT) mask error :( nserror *) Error
2.-(ID) initwithdata :( nsdata *) Data options :( unsigned INT) mask error :( nserror *) Error
The two methods can convert the data of the nsstring or nsdata class into XML documents that can be parsed by the gdataxmlnode class.
3.-(gdataxmlelement *) rootelement returns information about all nodes in gdataxmlelement.
4.-(nsarray *) elementsforname :( nsstring *) Name: returns all nodes named name under the current node, and returns an array.
5.-(nsstring *) stringvalue returns the value in the middle of the node.
Ii. JSON: sbjson, an open-source framework, is used to extend the nsstring class. All nsstring objects in our program can call the method.
Sbjson method-(ID) jsonvalue this method returns an ID class object, because JSON information is transmitted by key value, so we will use nsdictionary to receive this return value.
Two structures:
1. Set of "key-value pairs. Object, record, struct, Dictionary, hashtable, keyed list, and associative array ).
2. ordered list of values. Array ).