Example patch operations
<add sel="*"><foo/></add>
<add sel="*/foo" type="@a">1</add>
<add sel="*" type="namespace::f">urn:foo</add>
<add sel="*/foo[1]" pos="before">
<foo b='bar'>
<!--comment node -->
<bar xml:id="r123"/>
</foo>
</add>
<replace sel="*/foo"><bar/></replace>
<replace sel="*/foo[@a='1']/@a">1+</replace>
<replace sel="*"><r xmlns="urn:foo"/></replace>
<replace sel="*/foo/text()">New text</replace>
<remove sel="*/foo[1]"></remove>
<remove sel="*/foo[@a='1']/@a"/>
<remove sel='id("r123")'/>
Patch operations:
(will be embedded with an XML prolog and <root> element)
Target document to be patched:
<?xml version="1.0" encoding="UTF-8"?>
<patch/>