honghaoz / Ji

Ji (戟) is an XML/HTML parser for Swift
MIT License
824 stars 64 forks source link

Invalid XPath #47

Closed the-freshlord closed 6 years ago

the-freshlord commented 6 years ago

Hello, when using an XPath like this:

guard let jiHTML = Ji(htmlString: html) else {
     dispatchGroup.leave()
     return
}
guard let scoreboxNodes = jiHTML.xPath("//div[@class='new-score-box-wrapper']") else {
      dispatchGroup.leave()
      return
}

I get an invalid predicate error. The path that i have given is valid. I also tried switching to the swift4 branch but that didn't work either.

the-freshlord commented 6 years ago

45

henry-swe commented 6 years ago

Yes, same problem in Xcode 9

honghaoz commented 6 years ago

Ji 2.1.0 is up. Should've fixed this problem. Thx