[Home] [By Thread] [By Date] [Recent Entries]


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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member