Sorry Icko...I missunderstood your question.
First of all...you get a DocumentType from your doc.getDoctype(), not a Node. After that just call the method myDoctype.getSystemId().
 
Apologizes
 
 
----- Original Message -----
From: ICKO
Sent: Friday, June 22, 2001 3:59 PM
Subject: How can I get a string of DOCTYPE from XML file

How can I get the DOCTYPE from XML file?
<!DOCTYPE CDBOOK SYSTEM "Test2.dtd"> the result will be "Test2.dtd"
I tried to use following code get it, but the value was null...
Node dtd = (Node)document().getDoctype();
String value = dtd.getNodeValue();
 
thank for help!
 
 

Reply via email to