# \[PHP / XML\] Super-basic question

**URL:** <https://forum.kirupa.com/t/php-xml-super-basic-question/212306>\
**Category:** programming\
**Created:** [January 10, 2007, 2:14am UTC](https://forum.kirupa.com/t/php-xml-super-basic-question/212306 "2007-01-10T02:14:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daleth](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daleth/32/1096_2.png) [@daleth](https://forum.kirupa.com/u/daleth)\
**Post date:** [January 10, 2007, 2:14am UTC](https://forum.kirupa.com/t/php-xml-super-basic-question/212306/1 "2007-01-10T02:14:03Z")

</div>

Hi everyone, I’m trying to write a really simple XML database application that adds form input from a page into an XML file. I’ve done some XML parsing in PHP before, but my question is mainly, what’s the easiest/most appropriate way to add to XML from form inputs? Do you read in the existing XML, add to it, and rewrite the file?

Like I said, I have experience in parsing and getting a data structure, but what I’m not sure about yet is how to add to / update an XML file. Can anyone point out a specific example, tutorial or library? Thanks in advance!!
