Dependencies ------------ libexpat-ocaml-dev ocaml-findlib ocaml-ulex ocaml-nox camlp4 and their dependencies as well as ocamlbuild which is part of the standard ocaml distribution. The "src" directory should contain a copy of the XMLTree source dir (this can be a symbolic to the XMLTree directory). Build instructions ------------------ Build the XMLTree library: cd src/XMLTree; make clean all; cd - Build the xpathcomp program: ./configure ./build See ./build --help to customize the build process (build with debugging/profiling code, build ocaml bytecode instead of native binary etc...). This will produce a main.native executable (a symlink to the real binary which lies in the _build/src directory). Usage ----- ./main.native [options] 'input_file' 'query' [output_file] input_file can be either an xml file (and thus the name must have a .xml extension) or an indexed file (with a .srx extension). Due to a bug in the parser, the query can only use the explicit syntax, that is: /descendant::a/child::b[ child::a and descendant::c or not(contains( ., "str")) ]/descendant::d and no // or a/b/c. Text predicates must be of the form function( ., "string") where function can be: contains, equals, starts-with, ends-with. Available options are: -c counting only (don't materialize the result set) -f sample factor [default=64] -i index empty texts [default=false] -d disable text collection[default=false] -s save the intermediate representation into file.srx -b real bottom up run -nj disable jumping -index-type {default|swcsa|rlcsa} choose text index type -v verbose mode -help Display this list of options --help Display this list of options