Skip to content

ufz/xmlpatch

Repository files navigation

Compiling in linux:
-------------------
autoreconf -i (optional)
./configure
make

Running tests:
--------------
make check
and/or
xml-patch -v -f test.xml -p patch.xml

Patch operations described in rfc5261:
--------------------------------------
- multi-select extension (not in the specification):
  <add msel="//foo"><bar/></add> ; adds <bar> onto <foo> anywhere
  <replace msel="*/foo"><bar/></replace> ; replace each <foo> with <bar>
					   under document root element
  <remove msel="//@attr"/> ; removes all "attr" attributes from the document

Simple and stupid auto diff tool:
---------------------------------
- look diff directory for a simple diff generator
- compares elements at each tree level with a simple (trivial) logic
- XPath selector values use only positional constraints

Testing:
--------
xml-diff -f test.xml -t patch.xml [-v] [-b] [-o file]

option -b does an additonal patch test
option -o file stores diff result


Install:
--------
- make install, better to use packaging - debian included. Rpm spec included
  which will be generated by running ./configure

License:
--------
GNU LGPL

Legal notice (LEGAL_NOTICE):
----------------------------
clarifies some legal aspects of the software