# Opening, editing, and saving XML files

**URL:** <https://forum.kirupa.com/t/opening-editing-and-saving-xml-files/201032>\
**Category:** programming\
**Created:** [September 18, 2006, 12:53am UTC](https://forum.kirupa.com/t/opening-editing-and-saving-xml-files/201032 "2006-09-18T00:53:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobby\_hamilton](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@bobby\_hamilton](https://forum.kirupa.com/u/bobby_hamilton)\
**Post date:** [September 18, 2006, 12:53am UTC](https://forum.kirupa.com/t/opening-editing-and-saving-xml-files/201032/1 "2006-09-18T00:53:09Z")

</div>

Hello All,

I am trying to write a script in php that will enable me to edit and save .xml files on my server.

I have tried using:

```auto
fopen($file, "w+");

```

for opening the xml files into an editabe text box, but this method seems to only work on .txt and .html files. When I try loading an xml file using this method, it gives me an “xsl error”.

Any help on how I might be able to fix my problem would be greatly appreciated! Thanx in advance.

Kind Regards,
