[
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: | -- (:) |
| From: | Michael Wohlwend <micha-1@f...> |
| Subject: | Re: [Caml-list] xml tree -- variant type tree |
On Tuesday 28 February 2006 16:23, Hendrik Tews wrote: > Hi, > An alternative would be to use XML-Light, which produces string > labelled trees, and to translate these string trees myself. I found that difficult > Is there some better solution? I have used expat to parse my xml. To get more managable code I only use expat to fill a queue with the tags found: Start(tag,attr list) and End(tag,text). Then I make a stream of the function which reads that queue and can use ocaml's streamparsers to parse my xml and build my data structures quite easy. It's short, fast and easy changeable. The streamparses can watch only for the relevant tags to get the desired information and build the result. Michael