Jump to content

[SOLVED] Reading and writing and deleting in an XML file


mike12255

Recommended Posts

I have an XML file that i need to read write and delete things from i've been looking around at tutorials but they all look really long and not really achomplish what i need is there an easier way??

 

<?xml version="1.0" encoding="UTF-8"?>
<slideshow maxImageWidth="480" maxImageHeight="480" textColor="0xFFFFFF" frameColor="0xFFFFFF" frameWidth="20" stagePadding="40" navPadding="40" thumbnailColumns="3" thumbnailRows="3" navPosition="left" vAlign="center" hAlign="center" title="C & A Steak House" enableRightClickOpen="true" backgroundImagePath="" imagePath="" thumbPath="">
<image>
<filename>tall.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>wide.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>tall.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>wide.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>tall.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>wide.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>tall.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>wide.jpg</filename>
<caption></caption>	
</image>
<image>
<filename>tall.jpg</filename>
<caption></caption>	
</image>
</slideshow>

the standard php library has an XMLWriter class that makes generating XML a breeze...and SimpleXML class makes readin XML a breeze as well...Im sure you can find a tutorial online that makes use of these... :-)

 

Overview of both:

http://devzone.zend.com/article/2387

 

quick google search gave me this...

looks promising, looks like instead of printing the result you could write it to a file... :-)

 

http://simonwillison.net/2003/Apr/29/xmlWriter/  <- not to be confused with Official XMLWrited class

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.