code: public void writeDTD(String dtd) throws XMLStreamException {
  		if (preserveDTD) {
  			try {
  				this.checkPendingATEvents();
  				SimpleDocTypeParser dtdParser = getDtdParser();
  				dtdParser.parse(dtd);
  
  				encoder.encodeDocType(dtdParser.name, dtdParser.publicID,
  						dtdParser.systemID, dtdParser.text);
  			} catch (Exception e) {
  				throw new XMLStreamException(e.getLocalizedMessage(), e);
  			}
  		}
  	}
docs: /*
  Write a DTD section.
  
  (non-Javadoc)
  
  @see javax.xml.stream.XMLStreamWriter#writeDTD(java.lang.String)