Forum Moderators: coopster

Message Too Old, No Replies

How to read full xml file including tags and modify contents

         

freddo

9:20 am on Jun 30, 2006 (gmt 0)

10+ Year Member



I wish to read an xml file, change a couple of lines and write it out again. However when I use
fgets, fopen() or fread() PHP strips off the tags and only leave the contents.

I want to be able to read the full file including tags and xml header into an array.
How can this be done?

Novice freddo

adni18

8:04 pm on Jun 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Post some code... it shouldn't be doing that.

freddo

6:23 am on Jul 2, 2006 (gmt 0)

10+ Year Member



THanks ADNI18. Have solved the problem by reading the whole file into a string and manipulating form there.

Freddo