joelmheim/XmlUpdater — Issue #2: Functionality for adding child elements
Author: joelmheim
Created: 2011-11-09 22:03:04+00:00
State: open

We need new functionality to add a child as sibling to an existing element, and to add a new element at the root level.

Given the following xml:

1

Add child element:
xml_updater.add_child_element('//node/item', 'foo', '10')
would result in this:

1
10

For adding to the root level it should look like this:
xml_updater.add_element_to_root('foo', 'bar')
would result in this

1

bar