Feeds are streams of content that people can use to share pieces of information across websites.
PHP5’s simple XML functions dramatically simplify the process of interpreting the feeds into something useful for your web pages.
I have a xml file, which needs to be appended with data after the main element and save the xml file without overwriting the existing xml file but to append the data to already existing data and update the xml file.
Now every time when xml going to modify, with the type attribute.
A program turns that data into feeds that get pulled by other programs.
Now when again search for hotels is done then it will remove the elements which have child element with value hotels. schools is done at that time data related to the schools are appended to the xml file. now again search for schools is done then it will remove the element related to schools. If you have any other problems I am open to discussion.I want to update the node values but the above code seems to be incorrect. UPDATE: My question is somewhat similar to this Updating a XML file using PHP but here, I'm loading the XML from an external file and also I'm updating an element, not an attribute. Also, as Ward Muylaert pointed out, you need to save the file. Here's a great tip: always name the variable that holds your XML document after its root node, it will prevent such confusion.Your program shows the form firstly, then saves data secondly.So when you click button submit, the program shows the form with previous data first and then, saves 'new' data.