-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
64 lines (44 loc) · 2.42 KB
/
Copy pathREADME
File metadata and controls
64 lines (44 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
ATTENTION!! This is not the official library by Daniel Bünzli, but a modified version for Lwt
The official library is here : http://erratique.ch/software/xmlm
NOTES:
* This is a "quick made version". In particular, there are plenty of recursive functions call that could be optimized by passing the current input as a argument ..
* Build & install is now done through make
...............................................................................
Xmlm - Streaming XML input/output for OCaml
Release 1.0.2
...............................................................................
Xmlm is an OCaml module for streaming XML input/output. It aims
at making XML processing robust and painless. The streaming interface
can process documents without building an in-memory representation. It
lets the programmer translate its data structures to XML documents and
vice-versa. Functions are provided to easily transform arborescent
data structures to/from XML documents.
To facilitate its integration into projects Xmlm is made of a single
module and distributed under the new BSD license.
Project home page : http://erratique.ch/software/xmlm
Contact : daniel.buenzl i@erratique.ch
# Installation
Xmlm was tested with OCaml 3.10. xmlm.mli and xmlm.ml contain everything,
the code, the documentation and the license. You can just copy them to
your project directory or better, if you use ocamlbuild, issue the following
commands from the root directory of your project :
> ln -s /path/to/xmlm-1.0.2/src xmlm
> echo "<xmlm> : include" >> _tags
The documentation is generated by ocamldoc from xmlm.mli. You can find
a generated version in the doc/ directory of the distribution.
If you have ocamlbuild, Xmlm can be installed in the xmlm/ directory
of `ocamlc -where` by typing :
> ./build
> ./build install
to install to a different location :
> INSTALLDIR=/path/to/install/dir ./build install
A test program, xmltrip, is provided in the test/ directory. It can
be built with :
> ./build xmltrip.native
xmltrip reads XML files with Xmlm and outputs them back in various
ways. It is useful to understand how Xmlm handles documents. xmltrip
-help has more information.
If you need to parse XHTML, there is a file named xhtml.ml in the
test/ directory. It contains an OCaml list coupling each XHTML
character entity with its corresponding UTF-8 encoded character
string. You can use it to program a suitable entity callback.