Hot to add xml tag at the start of file and at the end

Posted by fakson on Stack Overflow See other posts from Stack Overflow or by fakson
Published on 2010-05-01T23:22:46Z Indexed on 2010/05/01 23:27 UTC
Read the original article Hit count: 290

Filed under:
|

I've got broken data.xml file, how i can fix it with php? I need to add at the beginning of the file two lines

<?xml version="1.0" encoding="UTF-8"?>
<archive>
...<xml data>...

And at the end of the file

</archive>

Does anyone have any ideas or solutions how to add and save xml structure?

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml