Skip to content

Instantly share code, notes, and snippets.

@mamund
Created March 2, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamund/1960447 to your computer and use it in GitHub Desktop.
Save mamund/1960447 to your computer and use it in GitHub Desktop.
PATCH document models
<!--
simple patch document
- flat document model
- always assume //{name} will be sufficient (need not be unique)
- always treat <value>...</value> as a replacement, even when it includes child elements
- no guarantees on processing order (adds might execute before delete, etc.)
- referring to the same name twice in a document is illegal
-->
<patch>
<add>
<field>
<name>...</name>
<value>....</field>
</field>
</add>
<remove>
<field>
<name>...</name>
</field>
</remove>
<modify>
<field>
<name>...</name>
<value>....</value>
</field>
</modify>
</patch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment