[
Lists Home |
Date Index |
Thread Index
]
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
|