* [Caml-list] Create a XML with PXP
@ 2003-06-06 8:52 amata
2003-06-06 9:33 ` Dominique Quatravaux
0 siblings, 1 reply; 2+ messages in thread
From: amata @ 2003-06-06 8:52 UTC (permalink / raw)
To: caml-list
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;
<!ELEMENT NOTE (#PCDATA)>
<!ATTLIST NOTE type (warning | comment) #REQUIRED>
The node NOTE has one attribute, type, and at the same time has
data.
How can I create this node?
Thank you very much.
-------------------
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] Create a XML with PXP
2003-06-06 8:52 [Caml-list] Create a XML with PXP amata
@ 2003-06-06 9:33 ` Dominique Quatravaux
0 siblings, 0 replies; 2+ messages in thread
From: Dominique Quatravaux @ 2003-06-06 9:33 UTC (permalink / raw)
To: caml-list
>
> 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;
>
> <!ELEMENT NOTE (#PCDATA)>
> <!ATTLIST NOTE type (warning | comment) #REQUIRED>
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-06 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-06 8:52 [Caml-list] Create a XML with PXP amata
2003-06-06 9:33 ` Dominique Quatravaux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox