A: 

Don't use regex to parse html or xml. Use a parser.

wheaties
Can you suggest a parser/code to parse this?
Bob Cavezza
http://www.php.net/manual/en/class.xmlreader.php
sheeks06
@Bob Cavezza: [Search is your friend =)](http://stackoverflow.com/questions/292926/robust-mature-html-parser-for-php)
R0MANARMY
Don't use php so I can't recommend a good parser for you to use. The advise still stands.
wheaties
@Bob - Take a look here: http://php.net/manual/en/book.dom.php and here http://www.php.net/manual/en/refs.xml.php
Peter Ajtai
@R0MANARMY Search is your friend, but not as efficient as someone knowledgeable giving you an answer. :-)
Bob Cavezza
@Bob Cavezza: How do you think I found it =). I mostly work with .NET.
R0MANARMY
+1  A: 

If you are looking for a solution with the fastest execution speed XmlReader is one of the fastest XML parser. It is a bit harder to use, then other solution such as DOM, but since you want to parse a lot of entry, performance is probably important.

Otherwise DOM is pretty simple to use. You can find a simple example of how to use in this answer I gave on an other question.

If you want to load up your content as a string here's how you do it :

XMLReader

$foo = new XMLReader();
$foo->xml($yourStringHere);

DOMDocument

$foo = new DOMDocument();
$foo->loadHTML($yourStringHere);
HoLyVieR
To use these xml readers, do I need to change this data into an xml object and then parse the code? or can I parse the xml using this data as a php string?
Bob Cavezza
@Bob If you are parsing HTML, it is already XML.
HoLyVieR
Bob Cavezza
@Bob See my edit for how you can load up your data as a string into both XMLReader and DOMDocument.
HoLyVieR
Thanks - appreciate it.
Bob Cavezza