caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Manipulating xml files withing ocaml
@ 2008-11-23 17:18 Romain Beauxis
  2008-11-23 17:29 ` Jean Krivine
  0 siblings, 1 reply; 6+ messages in thread
From: Romain Beauxis @ 2008-11-23 17:18 UTC (permalink / raw)
  To: Jean Krivine; +Cc: caml-list


 Hi Jean !



On Sun, 23 Nov 2008 10:13:27 -0700, "Jean Krivine" <jean.krivine@gmail.com>

wrote:

> Just a quick question, I would like to open and access easily an xml

> file within my ocaml program. Does someone have a small library that

> would help me doing that?  All the things I found for now are

> libraries that help me construct xml and check for consistency which

> is not what I want.



If the xml you intend to parse is not too broken (like html for instance), 

you can try to use xml-light, whose APIis very simple.



The link:

  http://tech.motion-twin.com/xmllight.html



Romain


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Manipulating xml files withing ocaml
  2008-11-23 17:18 [Caml-list] Manipulating xml files withing ocaml Romain Beauxis
@ 2008-11-23 17:29 ` Jean Krivine
  2008-11-23 17:35   ` Re : " Adrien
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Krivine @ 2008-11-23 17:29 UTC (permalink / raw)
  To: Romain Beauxis; +Cc: caml-list

Superb that seems to be what I needed thanks!
J

On Sun, Nov 23, 2008 at 10:18 AM, Romain Beauxis <toots@rastageeks.org> wrote:
>
>  Hi Jean !
>
> On Sun, 23 Nov 2008 10:13:27 -0700, "Jean Krivine" <jean.krivine@gmail.com>
> wrote:
>> Just a quick question, I would like to open and access easily an xml
>> file within my ocaml program. Does someone have a small library that
>> would help me doing that?  All the things I found for now are
>> libraries that help me construct xml and check for consistency which
>> is not what I want.
>
> If the xml you intend to parse is not too broken (like html for instance),
> you can try to use xml-light, whose APIis very simple.
>
> The link:
>  http://tech.motion-twin.com/xmllight.html
>
> Romain
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re : [Caml-list] Manipulating xml files withing ocaml
  2008-11-23 17:29 ` Jean Krivine
@ 2008-11-23 17:35   ` Adrien
  2008-11-23 17:54     ` Dario Teixeira
  0 siblings, 1 reply; 6+ messages in thread
From: Adrien @ 2008-11-23 17:35 UTC (permalink / raw)
  To: Jean Krivine; +Cc: Romain Beauxis, caml-list

PXP may be a better choice. It's harder at first, but not much and
could be worth the five additionnal minutes required to learn it. It
handles unicode and is still maintained (among others).


 ---

Adrien Nader


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re : [Caml-list] Manipulating xml files withing ocaml
  2008-11-23 17:35   ` Re : " Adrien
@ 2008-11-23 17:54     ` Dario Teixeira
  2008-11-23 19:03       ` Jean Krivine
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Teixeira @ 2008-11-23 17:54 UTC (permalink / raw)
  To: Jean Krivine, Adrien; +Cc: Romain Beauxis, caml-list

> PXP may be a better choice. It's harder at first, but
> not much and
> could be worth the five additionnal minutes required to
> learn it. It
> handles unicode and is still maintained (among others).

Indeed.  If you find yourself routinely having to deal with XML,
and if you need more advanced features such as validating very
complex DTDs, than learning PXP is well worth it (Xml-light
will choke on all but the simplest DTDs).

If you are doing heavy manipulation of XML and wished for a
more "native" support in the language, then take a look at
Cduce/Ocamlduce.

Finally, if you just need to parse a simple XML file and this
is a one-off event, then Xml-light is indeed the simplest option.

Cheers,
Dario Teixeira






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re : [Caml-list] Manipulating xml files withing ocaml
  2008-11-23 17:54     ` Dario Teixeira
@ 2008-11-23 19:03       ` Jean Krivine
  2008-11-23 22:45         ` Jake Donham
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Krivine @ 2008-11-23 19:03 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: Adrien, Romain Beauxis, caml-list

In my case I just want to parse a small xml file and I don't need to
check for consistency so I think xml-light is fine enough. Thank you
for the references though
J

On Sun, Nov 23, 2008 at 10:54 AM, Dario Teixeira
<darioteixeira@yahoo.com> wrote:
>> PXP may be a better choice. It's harder at first, but
>> not much and
>> could be worth the five additionnal minutes required to
>> learn it. It
>> handles unicode and is still maintained (among others).
>
> Indeed.  If you find yourself routinely having to deal with XML,
> and if you need more advanced features such as validating very
> complex DTDs, than learning PXP is well worth it (Xml-light
> will choke on all but the simplest DTDs).
>
> If you are doing heavy manipulation of XML and wished for a
> more "native" support in the language, then take a look at
> Cduce/Ocamlduce.
>
> Finally, if you just need to parse a simple XML file and this
> is a one-off event, then Xml-light is indeed the simplest option.
>
> Cheers,
> Dario Teixeira
>
>
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re : [Caml-list] Manipulating xml files withing ocaml
  2008-11-23 19:03       ` Jean Krivine
@ 2008-11-23 22:45         ` Jake Donham
  0 siblings, 0 replies; 6+ messages in thread
From: Jake Donham @ 2008-11-23 22:45 UTC (permalink / raw)
  To: caml-list

One more choice is Xmlm:

  http://erratique.ch/software/xmlm

It is simpler than pxp and more complete/correct than xml-light.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-23 22:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-23 17:18 [Caml-list] Manipulating xml files withing ocaml Romain Beauxis
2008-11-23 17:29 ` Jean Krivine
2008-11-23 17:35   ` Re : " Adrien
2008-11-23 17:54     ` Dario Teixeira
2008-11-23 19:03       ` Jean Krivine
2008-11-23 22:45         ` Jake Donham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).