Search code examples
phpxml

SimpleXML or XMLReader?


which one of the two is more spread? I want to read out the version number from http://freshmeat.net/projects-xml/mysql/mysql.xml?branch_id=46519 but I want to use the one which more people have.

If you know another way to get the latest stable version number from mysql please tell me ;)


Solution

  • For this kind of task, reading the document into a DomDocument and using DomXPath is probably more suitable.

    To answer your question, both libraries (as well as DomDocument + DomXPath) are standard outfit with PHP5, so they would be equally fine choices.