git.annexia.org
/
libguestfs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New APIs: vfs-label and vfs-uuid return label and uuid for many fs types.
[libguestfs.git]
/
ocaml
/
examples
/
xmllight_loader.ml
1
open Xml
2
open Ocamlduce.Load
3
4
5
let from_xml ?ns xml =
6
let l = make ?ns () in
7
let rec aux = function
8
| Element (tag, attrs, child) ->
9
start_elem l tag attrs; List.iter aux child; end_elem l ()
10
| PCData s ->
11
text l s in
12
aux xml;
13
get l
14
15
let from_file ?ns s = from_xml ?ns (parse_file s)
16
let from_string ?ns s = from_xml ?ns (parse_string s)