Parse HTML is the same as Parse XML. You can use the parse XML method to parse HTML. nsstring * Path = [[[nsbundle mainbundle] resourcepath] stringbyappendingpathcomponent: @ "parsefile.html"]; // obtain the file path nsstring * string = [[nsstring alloc] initwithcontentsoffile: Paths encoding: nsutf8stringencoding error: Nil]; // obtain the file content nserror * error; ddxmldocument * xmldoc = [[ddxmldocument alloc] initwithxmlstring: String options: 0 error: & error]; // convert if (xmldoc) {nsxmlelement * rootelement = [xmldoc rootelement]; // obtain the root node nsxmlelement * bodyelement = [rootelement elementforname: @ "body"]; // obtain the body node nsarray * bodylist = [bodyelement elementsforname: @ "Div"]; // get the DIV node in the body node for (INT textindex = 0; textindex <[bodylist count]; textindex ++) {nsxmlelement * sub_title_list = (nsxmlelement *) [bodylist objectatindex: textindex]; nsstring * headstring = [[[sub_title_list elementforname: @ "h2"] stringvalue]; // obtain the content of the header node, that is, the <H2> label content // if multiple nodes exist, the nsarray * ptstringlist = [sub_title_list elementsforname: @ "p"]; // obtain the P node, that is, the p label for (INT I = 0; I <[textstringlist count]; I ++) {// first method to convert the nsxmlelement type to the nsstring type // nsstring * pstring = @ ""; // pstring = [textstring stringbyappendingstring: [[ptstringlist objectatindex: i] stringvalue]; // The second method converts the nsxmlelement type to nsstring type nsstring * pstring = @ ""; pstring = [textstring stringbyappendingstring: [nsstring stringwithformat: @ "% @", [ptstringlist objectatindex: I] ;}} two parts in the build must be configured in kissxml: 1. click your project (the top column on the left of xcode), click the info button in the center of the top of the xcode window, and click the build Tag: 2. click targets in the left column and double-click the files under it. The Info window of the Project is also opened. Click the build tab: