Hi I'm making my own ToDo program, and I need to add the ability for the user to create a ToDo item. When they do this, I need to be able to add in an XML element/section in a list file.
My XML file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<list>
<item>
<name>Item 1</name>
<due>Tomorrow</due>
</item>
<item>
<name>Item 2</name>
<due>Thursday</due>
</item>
</list>
Say if a user created an item with the name 'papers' and due date 'Tomorrow', I need to be able to make another list element like above and insert it before the </list> tag.
Basically I'm asking how can I write to my XML file at a specific position (at the end before the </list> tag)? Is it possible just to go to the end of the file and go back a line?