mike12255 Posted May 1, 2009 Share Posted May 1, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/156430-solved-reading-and-writing-and-deleting-in-an-xml-file/ Share on other sites More sharing options...
Maq Posted May 1, 2009 Share Posted May 1, 2009 is there an easier way?? Easier than what? Long? You should look into libraries that have an API to handle XMl such as, "simplexml". Quote Link to comment https://forums.phpfreaks.com/topic/156430-solved-reading-and-writing-and-deleting-in-an-xml-file/#findComment-823648 Share on other sites More sharing options...
DarkSuperHero Posted May 1, 2009 Share Posted May 1, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/156430-solved-reading-and-writing-and-deleting-in-an-xml-file/#findComment-823702 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.