Please can somebody show me a simple example of parsing some HTML using libxml.
#import <libxml2/libxml/HTMLparser.h>
NSString *html = @"<ul><li><input type=\"image\" name=\"input1\" value=\"string1value\" /></li><li><input type=\"image\" name=\"input2\" value=\"string2value\" /></li></ul><span class=\"spantext\"><b>Hello World 1</b></span><span class=\"spantext\"><b>Hello World 2</b></span>";
1) Say I want to parse the value of the input whose name = input2.
Should output "string2value".
2) Say I want to parse the inner contents of each span tag whose class = spantext.
Should output: "Hello World 1" and "Hello World 2".