Home > Net >  How to support xpath namespace prefix HtmlAgilityPack
How to support xpath namespace prefix HtmlAgilityPack

Time:03-12

When using xpath HtmlAgilityPack query, if with a namespace prefix in xpath, would be an error:

Need a namespace manager or XsltContext, the query has a prefix, variable or a user-defined function,

With a namespace prefix in xpath, example:
/HTML/body/div/span/o: p/p/img

O: p, lead to query the xpath error,
  •  Tags:  
  • C#
  • Related