添加新的 search flag “-lxml2” -将下面hpple的源代码加入到你的项目中: HTFpple.h HTFpple.m HTFppleElement.h HTFppleElement.m XPathQuery.h XPathQuery.m -XPath学习地址http://www.w3schools.com/XPath/default.asp 示例代码: #import "TFHpple.h" NSData
. // xpath Query is used by https://github.com/antchfx/xmlquery func (c *Collector) OnXML(xpathQuery xmlCallbackContainer, 0, 4) } c.xmlCallbacks = append(c.xmlCallbacks, &xmlCallbackContainer{ Query: xpathQuery
DOM interface{} isHTML bool } func (h *XMLElement) ChildText(xpathQuery string) string 总结下:colly