我需要找到一些方法來使用Xpath或Html選擇器從html文件中查找對象。Html Agility Pack:SelectSingleNode和XPath在Xamarin Forms平臺上不可用
由於Html Agility Pack不支持選擇器,因此我試圖使用XPath。
不幸的是,似乎SelectAingleNode(字符串somexpathvalue)在Xamarin Forms上不可用。 HtmlNode不包含它的定義。
我在NuGet中發現我沒有安裝System.Xml.XPath。當我嘗試這樣做,我看到一個錯誤:
Severity Code Description Project File Line Suppression State Error Could not install package 'System.Xml.XPath 4.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0
有什麼辦法,我可以使用的SelectSingleNode沒有System.Xml.Xpath?