Noobie Help - ' in innertext after xquery

Topics: User Forum
Jan 7, 2011 at 10:27 PM

Been looking at using HTML Agility Pack for the first time but I've struck an issue that I can;t seem to find an easy answer for. For some reason I'm getting the raw html encoding inside the innertext property after a xquery and I can;t figure out why. The encoding on the document is auto and the streamencoding is UTF. Is this the reason? Simple question I'm sure is how do I get the innertext without the html encoding. Example powershell simple script is below.


add-type -Path .\HtmlAgilityPack.dll
$htmldoc = New-Object HtmlAgilityPack.HtmlWeb
$result = New-Object HtmlAgilityPack.HtmlDocument
$result2=$result.DocumentNode.SelectNodes($xpath)|ForEach-Object {$_.InnerText}



What have I missed?