PDA

View Full Version : Using FSO to get <meta> content.


Mhtml
10-15-2002, 10:45 AM
How can I use FSO to get the keywords from a page?
As in the <meta name="keywords" content="KEYWORDS_HERE">

whammy
10-16-2002, 01:38 AM
Hmm... that's a good question. Assuming it's valid XML, you could parse the tree using XMLDOM...?

I haven't worked with this much, yet (although I am studying XML (which in itself is simple) right now)... but it looks like it's going to be a great method of separating content (data) from presentation. :D

http://www.w3schools.com/xml

Otherwise you could use a regular expression to search for the "<meta" tag until you reach the next ">"... and then figure out how to parse out everything else.

Maybe someone else has a better idea...

Mhtml
10-16-2002, 12:43 PM
You love your regular expressions don't you!
I'll have a quick go at doing it that way but I'm not going to try to hard as I am sought of in the middle of studying for exams which start tommorow. (17th). So I really shouldn't even be on the computer but I am just addicted to asp, I can't get enough of it.

As soon as my exams are out of the way XML is the first thing on my list.

Thanks anyway Whammy...:)