Need to parse/write/search through XML using PHP. Any good libraries?

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Hi everyone. Well, I've been tasked to use XML instead of a SQL database package to read/write data from for a web application I'm building. Currently I've been trying to make use of the ActiveLink PHP XML Package to make this process easier, but the documentation is pretty...sparse. Does anyone have a good library I could use for this?

As an example of what I'm trying to do, see this XML document. I'd like to find the user with an id of 1, then spit out their last_name to the screen. Modify last_name, and write it back to the XML file.

Any help? :)
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
how do you actually "work" with XML files? Do you use a lot of String functions? Like str_replace(blablabla) and stuff?
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Originally posted by: Entity
Have you considered any of PEAR's XML packages?
I did run into PEAR XML Parser but I'd really need some documented examples to work with to be able to accomplish much on my own. Know of any?
Originally posted by: ndee
how do you actually "work" with XML files? Do you use a lot of String functions? Like str_replace(blablabla) and stuff?
You could. I don't want to reinvent the wheel if I can avoid it though, hence my search for a library that does the basic work for me. :p
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
Originally posted by: yllus
Originally posted by: Entity
Have you considered any of PEAR's XML packages?
I did run into PEAR XML Parser but I'd really need some documented examples to work with to be able to accomplish much on my own. Know of any?
Originally posted by: ndee
how do you actually "work" with XML files? Do you use a lot of String functions? Like str_replace(blablabla) and stuff?
You could. I don't want to reinvent the wheel if I can avoid it though, hence my search for a library that does the basic work for me. :p

ah ok :) gotta inform me a little bit, I ALWAYS reinvent the wheel, I might take a look at PEAR I guess :)