In 2008, over one thousand people experienced the world’s first virtual web conference. Together, we created a new type of conference that is environmentally-friendly, affordable, and interactive.

In 2009, we are going to take it one step further.


Easy XML for PHP

I'm hacking together a little something in PHP and I found myself in the unfortunate position of having to use XML. If you find yourself in such a sad predicament, Keith Devens's PHP XML Library can make your life easier.

Creative Commons LicenseThe Easy XML for PHP article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Post Metadata

Date
December 18th, 2006

Author
Aral

Category

Tags


3 Comments

  1. Hi Aral,

    Last time I tried to parse a XML file in PHP was after using XPath in Flash, so I decided to find something like that for PHP. I finally found this:

    http://sourceforge.net/projects/phpxpath/

    It’s not super-easy to use, but does the work.

    Cheers!



  2. aral

    Cool, thanks for the link. XPath falls into the “more complicated than necessary” category for me after getting used to the transparent simplicity of E4X. I was actually thinking of using Java for this just so I could use Rhino but decided against it for other reasons.


  3. Question: what PHP version are you using?

    If you’re on PHP 5 then you should be able to use SimpleXML[1] or XMLReader[2].

    [1]http://www.php.net/manual/en/ref.simplexml.php
    [2]http://www.php.net/manual/en/ref.xmlreader.php (note: probably not available in 5.0, bundled and enabled by default in 5.1 )


Leave a Reply



Bad Behavior has blocked 0 access attempts in the last 7 days.