What syntax should be used with HTML Agility Pack to extract all
Tags from a Php file..?
HtmlNodeCollection tags = htmlDoc.DocumentNode.SelectNodes("//??php");
Throws an exception (invalid token).
Tried escaping ? with ?? and \?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HTML Agility Pack does choke on nodes with
?in the name. The simplest option is probably to go through the HTML string before you load it into a document object and replace instances of<?with<phpand so-on. That doesn’t handle any nasty cases like having a string literal on the page with “<?” but really, how often does that happen?