You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sudha Sathiaseelan <Su...@plumtree.com> on 2003/03/24 21:05:44 UTC

DTDs

Hi,

In looking at the DocumentTypeImpl API (1.4.4), I see that the class represents the Document Type declaration but not an actual DTD (thus does not appear to support the addition of elements, attributes, entities, etc.  Is there a way to do this (i.e. in the manner of creating elements on a new Document)?  Also, is it possible to take a full DTD (as a String) and create a new Document with the DTD included?

i.e.

<?xml version="1.0"?>
<!DOCTYPE note [
  <!ELEMENT note (to,from,heading,body)>
  <!ELEMENT to      (#PCDATA)>
  <!ELEMENT from    (#PCDATA)>
  <!ELEMENT heading (#PCDATA)>
  <!ELEMENT body    (#PCDATA)>
]>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend</body>
</note>

thanks,
Sudha

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org