Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add DTD Referenz in xml (SAX)

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
CH
how can I append a dtd to my xml file?
this is what ai have so far.

DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
Document doc = null;
try{
docBuilderFactory.setValidating(true);
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
doc = docBuilder.newDocument();
}catch (Exception ex){
//error
}

thanks
 
The DocumentBuilder is a DOM api, not SAX. The Javadocs for JDK1.4 state that ...
javadocs said:
The DOM Level 2 does not support editing the Document Type Declaration. docType cannot be altered in any way, including through the use of methods inherited from the Node interface, such as insertNode or removeNode.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top