scrapping text from a page and match it using a xml file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mehnaz
Forum Newbie
Posts: 20
Joined: Mon Jun 02, 2008 7:49 pm

scrapping text from a page and match it using a xml file

Post by Mehnaz »

Hi all,

I am curl for page scrapping and now want to match the text from the xml file in the scrapped page. For example I have the following xml file.

<book>
<author> ABC </author>
<title>alexander the great</title>
<link> http://example1.com</link>
</book>
<author> XYZ </author>
<title> World Wars </title>
<link> http://example2.com</link>
</book>

Now I want to match if the page consist any instance of the node vaues (ABC or XYZ) then highlight the matching text and provide link as specified in xml entry.

Any idea/example code or link will be highly appreciated.

Thanks in advance

Mehnaz
Post Reply