Digital Web Magazine

The web professional's online magazine of choice.

PHP and XML Sitting in a Tree : Comments

By Kerri Hicks

February 4, 2007

Comments

Brian Artka

February 6, 2007 10:21 AM

Very nice article Kerri! You shed some light on many different ways I can meld my PHP skills with simple XML files. thank you.

chriscrunch

February 6, 2007 11:03 PM

xml was a scary beastie i wasnt looking forward to meeting, but now hes just a cute lil puppy that wants to be played with! thanks for the article… i look forwardd to the day when my (shared) hosting upgrades to PHP5!

Designblogger

February 7, 2007 7:03 AM

Fine article, I found XML a little scary at first too. But this articles quite right!

Carole

February 7, 2007 9:05 AM

This is an unusually good article. It is very difficult to use examples in articles like this, which are simple enough for newcomers to understand, yet complex enough to show off the power of the tool in question (in this case, SimpleXML). You’ve done a great job of doing both of these things!

Jim Amos

February 7, 2007 11:01 AM

Excellent article. This is going to prove astonishingly useful. I’ve been afraid of XSLT for so long but this looks a lot more like my cup o tea.

jasobeam

February 7, 2007 3:35 PM

Thanks a lot! Very good article! Helped me a lot!

thinsoldier

February 24, 2007 10:59 AM

Nice article. XML is good. SimpleXML is a huge time saver.
HOWEVER:
simpleXML seems to be lacking functionality when it comes to xml files that use namespaces. It is possible to get the job done but it’s confusing and complicated compared to it’s normally easy to use functions for plain xml files.

I realized this when trying to make use of the xml feeds from Google Calendar

it’s easy to work with
<gd:when startTime=“300” />
using SimpleXML

but quite a pain to access startTime when the xml is written as
<when gd:startTime=“300” />

and to all you people afraid of xml, don’t be. It’s really a very simple and flexible concept. Only lack of tools/having to build your own tools is hard. And the related things like xslt probably have a learning curve but XML itself is simple.

k

March 21, 2007 2:14 AM

nice thoughts. i have been using xml as content model since php4 (wrote my own simplexml class back then), now with all other good things php5 finally came with true xml support. great. but i have been wondering about performance issues on using xml for storing bigger amounts of data.

take an example – a sitemap. common strategy have been to hold individual sitemap leafs in database, so on request php retrieves path to requested leaf using a db query.

on the other hand, storing sitemap in xml is much more natural way as xml is by itself structured document as the sitemap is.

my question is, in what point it would be unneccesary overhead, comparing to mysql for example, of loading entire xml tree on each request to reconstruct structure path for requested leaf? i think same questions can be extended to several different usecases where an app architect should decide whether information should stored in database or flat xml files.

Pianelli

March 28, 2007 2:37 PM

I use this extension to parse the XML-Definition of my DB-Schema to automate the creation and update of the tables, fields and indizes. It

PK

March 29, 2007 6:18 AM

Thanks for very interesting article. Can I translate your article into polish and publish at my webblog? I will back here and check your answer. Keep up the good work. Greetings
On my blog: Pozycjonowanie

Bernd

April 28, 2007 12:22 AM

Thanks for this article.I’m running several PHP-powered sites which mostly make use of XML (like Sofort Kredit).So this information is coming very handy to me.Regards, Bernd

Lopiuy

June 5, 2007 1:50 AM

Excellent article. This is going to prove astonishingly useful. I’ve been afraid of XSLT for so long but this looks a lot more like my cup o tea.Art

Klaus

July 30, 2007 6:09 AM

PHP is getting better and better, with all the XML/SOAP capabilities of PHP5 you need no more Harry Potter magic skills when you would like to use XML in web sites oder web applications. I’m using it for data exchange tastk with several web shops at HandyGO. Works like a charm.

Andy

August 14, 2007 11:14 PM

I

Sorry, comments are closed.

Media Temple

via Ad Packs