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 LAA27247; Fri, 6 Jun 2003 11:30:48 +0200 (MET DST) 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 LAA27347 for ; Fri, 6 Jun 2003 11:30:47 +0200 (MET DST) Received: from sarajevo.idealx.com (sarajevo.idealx.com [213.41.87.90]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h569UkH12772 for ; Fri, 6 Jun 2003 11:30:46 +0200 (MET DST) Received: from localhost (localhost [127.0.0.1]) by sarajevo.idealx.com (IDEALX S.A.S Mail Daemon) with ESMTP id 5349643123 for ; Fri, 6 Jun 2003 11:34:19 +0200 (CEST) Received: from sarajevo.idealx.com ([127.0.0.1]) by localhost (sarajevo.idealx.com [127.0.0.1:10024]) (amavisd-new) with ESMTP id 18889-03 for ; Fri, 6 Jun 2003 11:33:52 +0200 (CEST) Received: by sarajevo.idealx.com (IDEALX S.A.S Mail Daemon, from userid 66) id 7D5094312A; Fri, 6 Jun 2003 11:33:46 +0200 (CEST) Received: from dom by alliance-maui.ird.idealx.com with local (Exim 4.12) id 19ODb3-0001na-00; Fri, 06 Jun 2003 11:33:17 +0200 Date: Fri, 6 Jun 2003 11:33:17 +0200 From: Dominique Quatravaux To: caml-list@inria.fr Subject: Re: [Caml-list] Create a XML with PXP Message-ID: <20030606113317.A31889@alliance-maui.ird.idealx.com> Mail-Followup-To: caml-list@inria.fr References: <2cfe82e931.2e9312cfe8@tsc.uc3m.es> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2cfe82e931.2e9312cfe8@tsc.uc3m.es> User-Agent: Mutt/1.3.23i X-archive: yes X-Spam: no; 0.00; caml-list:01 pxp:01 funtion:01 attlist:01 api:01 node:02 tree:02 suppose:03 arguments:03 data:03 tend:06 type:07 problem:07 attribute:07 comment:08 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > Hi list; > > I´m creating a XML with PXP and I´ve one problem; > > I use the funtion "create_element_node" in order to create a node > with attributes in the XML tree , and I use the > function "create_data_node" in order to create a node with data, but: > How can I create a node with attributes and data? Is this possible? > > For example, in this DTD; > > > > > The node NOTE has one attribute, type, and at the same time has > data. > > How can I create this node? This really is an XML question. I do not know PXP at all, but in a DOM-like API (which I suppose PXP is), the data node would be a child of the element node like this: element node: type="NOTE" | \ | \ | attribute node: type="type", value="warning" | data node: contents="text of the warning here" Since you say create_element_node accepts attribute arguments, I tend to conclude that PXP will hide the oblique parent/child relationship for you, but not the vertical one. -- Dominique QUATRAVAUX Ingénieur senior 01 44 42 00 08 IDEALX ------------------- 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