cezheng / Fuzi

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
MIT License
1.08k stars 161 forks source link

xpath can not get right results with Xcode 10.2.1 #98

Closed stevema closed 5 years ago

stevema commented 5 years ago

Environment

How to reproduce:

let doc = try HTMLDocument(string: html) let titleXpath = "//html/body/center/form/div[1]/div/table//td[@class='f_title']//a[@href]" let titleItem = doc.xpath(titleXpath)

when use Xcode 10.1, titleItem has the right results,but the same codes in Xcode 10.2.1,titleItem is empty

cezheng commented 5 years ago

Would you please also share the HTML that produced the wrong results so that I can actually reproduce? Thanks!

cezheng commented 5 years ago

Also, I realized you are using version 1.0.1 which is not supposed to work with any version after Swift 3.x. Please update to the latest version and try again.

stevema commented 5 years ago

Also, I realized you are using version 1.0.1 which is not supposed to work with any version after Swift 3.x. Please update to the latest version and try again.

Thanks a lot, it's solved after update.