I have a XML file, videos.xml
,
<?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>
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 videos.xml
file so that it gets updated with the new tag.