[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-09-30 (10:36) |
From: | Sebastien Mondet <sebastien.mondet@g...> |
Subject: | Re: [Caml-list] xpath or alternatives |
> The discussion here has got quite theoretical, but it's not helping > me to write the original 3 lines of Perl in OCaml. > > Â Â my $p = XML::XPath->new (xml => $xml); > Â Â my @disks = $p->findnodes ('//devices/disk/source/@dev'); > Â Â push (@disks, $p->findnodes ('//devices/disk/source/@file')); > > My best effort, using xml-light, is around 40 lines: > > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=ocaml/examples/viewer.ml;h=ef6627b1b92a4fff7d4fa1fa4aca63eeffc05ece;hb=HEAD#l322 > Galax is (or was ??) an XQuery implementation in ocaml and XPath 2.0 is included in XQuery... so maybe you can use it... the site does not seem to respond now: http://www.galaxquery.org/ but there is a debian package: http://upsilon.cc/~zack/blog/posts/2008/02/galax_in_debian/ > Rich. > > -- > Richard Jones > Red Hat > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs