← Prev in month ← Prev in thread

Looking for tools to build valid XML file.

From
Bruce Kulik <>
To
Date
2004-01-12T14:41:20Z
ID
<000a01c3d91a$25133a20$6465a8c0@de6iw>
Thread
Looking for tools to build valid XML file.
I am looking for a software module to help create valid XML given a
DTD and an element name and data.  For example, suppose you have the
following simple DTD:

<!ELEMENT a (x , y , z)>
<!ELEMENT x (#PCDATA)>
<!ELEMENT y (q | r)*>
<!ELEMENT z (#PCDATA)>
<!ELEMENT q (#PCDATA)>
<!ELEMENT r (#PCDATA)>

Calling for a new "r" element with string "data" on an empty tree
would result in:

<a>
  <x/>
  <y>
    <r>data</r>
  </y>
</a>

Then calling for a new "q" element with string "string" would result
in:

<a>
  <x/>
  <y>
    <r>data</r>
    <q>string</q>
  </y>
</a>

Does anybody know of such a library or product?

Bruce Kulik
← Prev in month ← Prev in thread