PHP and XML

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
So I've stored text in a file, conquered Oracle and MySQL databases, and even ventured off in cookies to store variables through PHP. The next logical step is XML based storage correct?
Are there any good guides to get me started on this? I've done very little XML, but i know the basic format of the files and how things work in them somewhat. I just need some decent PHP examples of storing stuff ...I've got the parsing down for the msot part though the PHP help pages :D
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
Whats there to know about XML you are basically creating your own markup. If you really want to do the most with it, I suggest you look into learning XSLT. It neither XML or XSLT really have to do much with PHP other than outputing the code, but you can take alot of strain of the server and just past the client and XML datapage and then just pass small XSLT sheets that pull from the information. I personlly dont get the point of parseing XSLT on the server, other than for browser compadibility with browsers that dont have and XML and XSLT parser. I personly see the point of XML is to help just pass info to the client and then let them manipulate and pass it back, thus cutting down on the number of client server communications, and server database requests. You can get to a point where the client starts a request and you pull the relative data from the database and then start a session so you can expire the data after a set time, then you just have to pass the client static info untill they need to change the info or refresh it.
 

vetteguy

Diamond Member
Sep 12, 2001
3,183
0
0
I need to ask a similar but slightly different question...I've been looking up examples of how to get PHP to output/manipulate XML without just writing a bunch of strings. I've found some resources, but it all requires something be activated within PHP that apparently isn't turned on in the version running with my hosting provider. Is there anything I can do, or are there any other tricks to make it work a little more cleanly?

Drakkon, you said that you had some examples, would you be willing to share them with me?
 

BZ

Member
Jan 9, 2003
160
0
0
it's not php specific but the o'reilly xml in a nutshell book is really good and readable. it has lots of information on xslt and xpath, which is the interesting part for programming
 

vetteguy

Diamond Member
Sep 12, 2001
3,183
0
0
Originally posted by: BZ
it's not php specific but the o'reilly xml in a nutshell book is really good and readable. it has lots of information on xslt and xpath, which is the interesting part for programming
Thanks, I'll check it out!
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
all my exaples utilize the xml functions in php so things like xml_parse and xml_get_error_code..im not sure and all of them came from the chm help file from php.net ;)