używam następujące metody rozebrać wszystkie HTML z ciągu znaków:HTMLagilitypack nie usuwa wszystkich znaczników html. Jak mogę skutecznie rozwiązać ten problem?
public static string StripHtmlTags(string html)
{
if (String.IsNullOrEmpty(html)) return "";
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(html);
return doc.DocumentNode.InnerText;
}
ale wydaje się, ignorując tę następujący tag: […]
więc ciąg wraca w zasadzie:
> A hungry thief who stole a rack of pork ribs from a grocery store has
> been sentenced to spend 50 years in prison. Willie Smith Ward felt the
> full force of the law after being convicted of the crime in Waco,
> Texas, on Wednesday. The 43-year-old may feel slightly aggrieved over
> the severity of the […]
Jak można Upewniam się, że ten rodzaj tagów zostanie usunięty?
Każdy rodzaj pomocy jest doceniany, dzięki.
'' … nie jest tag HTML. Znacznik ma nawiasy kątowe. To zakodowany byt. – jessehouwing