pomorin
asked on
How to get only Meta tags from URL ?
Hello !
I use HttpWebRequest to get HTML from URL. Then I get Meta tags from HTML.
Can I get only Meta tags from URL ?
Thanks
I use HttpWebRequest to get HTML from URL. Then I get Meta tags from HTML.
Can I get only Meta tags from URL ?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the reply.
I do it now(receiving the entire Html from which I parse and extract the <META> tags).
May be is there the method to get only meta tags from URL ?
I do it now(receiving the entire Html from which I parse and extract the <META> tags).
May be is there the method to get only meta tags from URL ?
If the HTML is a valid XML document, you could load it into an XmlDocument from the string and use an xpath query to easily locate the META tags. However, most HTML is full of bugs, mismatched tags, etc (due to forgiving browsers) so the way you are doing it is probably sufficient (scanning the response string for the META tags).
Gary.
Gary.
ASKER
I do it now(receiving the entire Html from which I parse and extract the <META> tags).
May be is there the method to get only meta tags from URL ?