caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] parsing XML configuration file
@ 2002-12-03 14:56 Basile STARYNKEVITCH
  2002-12-03 16:56 ` Mike Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Basile STARYNKEVITCH @ 2002-12-03 14:56 UTC (permalink / raw)
  To: caml-list

Dear All

I'm coding a program (the POESIA [opensource content filter] monitor -
see www.poesia-filter.org) whose configuration file is an XML file.

The choice of an XML syntax is (in part) "political", because XML is
a fancy buzzword and might attract some people. Actually, I could
change it.

The configuration file is a shallow tree (a bit like Apache
configuration [which I know is not XML])

In XML parlance, the DTD or Schema of the parsed XML file is fixed by
me (it mimicks all the configuration bell & whistle I need), but of
course I may need to evolve it.

I'm currently using PXP for that purpose, but I might be wrong.

Should I consider switching to other Ocaml XML parsers (in particular
yaxpo) to parse such a file (whose DTD is fixed by me, and which is
mostly a shallow tree, not a recursive one..).

Yes I know my question is a bit vague, but I beg for advice.

Regards.
-- 

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
alias: basile<at>tunes<dot>org 
8, rue de la Faïencerie, 92340 Bourg La Reine, France
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] parsing XML configuration file
  2002-12-03 14:56 [Caml-list] parsing XML configuration file Basile STARYNKEVITCH
@ 2002-12-03 16:56 ` Mike Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Lin @ 2002-12-03 16:56 UTC (permalink / raw)
  To: Basile STARYNKEVITCH; +Cc: caml-list

>
> I'm currently using PXP for that purpose, but I might be wrong.
>
> Should I consider switching to other Ocaml XML parsers (in particular
> yaxpo) to parse such a file (whose DTD is fixed by me, and which is
> mostly a shallow tree, not a recursive one..).
>
> Yes I know my question is a bit vague, but I beg for advice.

Yaxpo is a nonvalidating parser, so if you require the DTD validation, 
you should keep using PXP. If you do not require the DTD validation, 
for parsing some flat XML stored in a file, there is no particular 
reason why you should switch, since PXP and Yaxpo both do this fine.

The only situation in general in which you really have to use Yaxpo 
instead of PXP is when you need to achieve weird control effects with 
stopping and restarting the parser; I don't think this is the case for 
you. Otherwise, the differences between the parsers are not that much. 
They have different styles of data models, which may be significant. 
Yaxpo has fewer dependencies. Because of all the CPS constructs Yaxpo 
uses internally, PXP is probably faster (although I haven't tested it).

-Mike

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2002-12-03 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 14:56 [Caml-list] parsing XML configuration file Basile STARYNKEVITCH
2002-12-03 16:56 ` Mike Lin

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).