XML Parsing Help

I don't want to always rely on MySQL for EVERYTHING. Every minor tid-bit configured by either 1 or 2, and sometimes 3.

I know how to create XML config files, and I know how to read them and extract a certain thing. What I need to know is the following:

How to read the attributes

How to change values and attributes

If anyone could lighten me on those and tell me... maybe point me to a good informative tutorial, I will be happy

Thanks.

UPSGuy

Lurker ಠ_ಠ

Posts: 2733

Loc: Nashville, TN

3+ Months Ago

All my XML-config experience is in C# and perl, but I looked around for articles and this one seems particularly awesome.

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

Alright, can I have a non-PEAR solution?

spork

Brewmaster

Posts: 6299

Loc: Seattle, WA

3+ Months Ago

http://www.php.net/dom

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

Thanks spork. I'll look into this.

UPSGuy

Lurker ಠ_ಠ

Posts: 2733

Loc: Nashville, TN

3+ Months Ago

Just outta curiosity, why the disdain for pear?

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

No real reason really... just don't want it for some reason

I might look into using PEAR one day though.

UPSGuy

Lurker ಠ_ಠ

Posts: 2733

Loc: Nashville, TN

3+ Months Ago

ok, just wondering. Hands-on code is always nice for learning, but sooner or later (esp. working on large apps) you realize that libs like PEAR are great commodities to cut back on complexity w/out sacrificing reliability.

Back to the thread - are you looking for something like a tuto rather than a tool? i.e., do you want to code it all yourself?

Bogey

Genius

Posts: 8488

Loc: USA

3+ Months Ago

Yeah, I'd like to code this by myself as I'm trying to get more experience and knowledge in PHP

UPSGuy

Lurker ಠ_ಠ

Posts: 2733

Loc: Nashville, TN

3+ Months Ago

Spork had a good recommendation for you then. Maybe a few more:

I haven't tried this particular article, but Kirupa (article here) has always been a favorite of mine in PHP and ActionScript.