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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.