Read and write an XML file with PHP

sibeoffefly

New Member
I have a XML file, \[code\]videos.xml\[/code\],\[code\]<?xml version="1.0" encoding="ISO-8859-1" ?><videos> <video url="videos/Lillebjorn.f4v" desc="Lillebj?rn" /> <video url="videos/Storebjorn.f4v" desc="Storebj?rn" /> <video url="videos/Pegasus.f4v" desc="Pegasus" /></videos>\[/code\]I was wondering, how can I read the file above, and add a new tag <video url="" desc="" /> with the URL of the new video and description of it with PHP, and then overwrite the current \[code\]videos.xml\[/code\] file so that it gets updated with the new tag.
 
Back
Top