I need to modify an XML file
Moderator: General Moderators
I need to modify an XML file
I am trying to modify an XML file after it is loaded into the memory. The problem is I do not have access to Javascript and was wondering if there was any other way (like using C) to do this. Everytime I modify, I am changing a fixed set of attributes. Can someone please help me out?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: I need to modify an XML file
Here's the shocker. You can do this in PHP!
Re: I need to modify an XML file
Thanks... By any chance do you know of any way of doing the same using C or maybe C++? Basically I forgot to mention it accurately but I am looking to do this either using C or C++...
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: I need to modify an XML file
I don't, no. But google does.
Re: I need to modify an XML file
I found them but I got a little confused. I want to modify the XML after it has been loaded so that the changes are reflected in the program that has already constructed the DOM tree. Do you think these tools would be useful for that purpose?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: I need to modify an XML file
Yep. I would personally recommend SimpleXML. It's got a few methods such as createElement() etc. although you should check that you're PHP version is new enough to support them.