From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA24795; Sun, 29 Feb 2004 18:46:38 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA23767 for ; Sun, 29 Feb 2004 18:46:36 +0100 (MET) Received: from mwinf0103.wanadoo.fr (smtp1.wanadoo.fr [193.252.22.30]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1THkZae027957 for ; Sun, 29 Feb 2004 18:46:36 +0100 Received: from morgana (ARennes-303-1-22-130.w81-53.abo.wanadoo.fr [81.53.7.130]) by mwinf0103.wanadoo.fr (SMTP Server) with ESMTP id 8B7DF1BF9570; Sun, 29 Feb 2004 18:46:35 +0100 (CET) Received: from david by morgana with local (Exim 4.30) id 1AxV1M-00014l-Ds; Sun, 29 Feb 2004 18:46:32 +0100 To: "Nicolas Cannasse" Cc: , "David MENTRE" Subject: Re: [Caml-list] Looking for OCaml code to load & save XML files References: <87y8qnnwsm.fsf@linux-france.org> <008301c3fe0f$0b410180$ef01a8c0@warp> From: David MENTRE Organization: none Date: Sun, 29 Feb 2004 18:46:32 +0100 In-Reply-To: <008301c3fe0f$0b410180$ef01a8c0@warp> (Nicolas Cannasse's message of "Sat, 28 Feb 2004 16:24:58 +0100") Message-ID: <871xodlqx3.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dmentre:01 cannasse:01 warplayer:01 pxp:01 motion-twin:01 conciseness:01 dependencies:01 pleases:01 hash:01 gerd's:01 camlzip:01 dmentre:01 encode:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello Nicolas, "Nicolas Cannasse" writes: > My advice : first experiment XmlLight and then switch to PXP if you lack > features. > > http://tech.motion-twin.com/xmllight I like you advice. I've looked at your library and it's conciseness and lack of dependencies pleases me. BTW, I need to save some short binary data in the XML format (e.g. MD5 128bits hash). Therefore, I would like to transform from/to an OCaml binary string type into a string suitable for printing in an XML file (in a CDATA field). Which code would you recommend to do that the "XML way"? At first sight, I intend to use Gerd's code to encode/decode MIME and base64 strings. As another side note, I also intend to read and write gziped XML files, using Xavier's camlzip package. As your module uses Lexing.from_* to get input file, I'll probably add an SFunction source type to be able to use Lexing.from_function. In the same way, I'll probably modify your output functions (Xml.to_string) to be able to ouput into a Gzip.out_channel without producing the whole XML file in a string. I'll gladly accept any advice on how to use your code, Yours, d. -- David Mentré ------------------- 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