- Timestamp:
- 2008-07-14T12:10:15+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/src/java/org/greenstone/gsdl3/util/XMLConverter.java
r13210 r16374 21 21 // XML classes 22 22 import org.w3c.dom.Document; 23 import org.w3c.dom.DocumentType; 23 24 import org.w3c.dom.Node; 24 25 import org.w3c.dom.NodeList; … … 173 174 174 175 if (nodeType == Node.DOCUMENT_NODE) { 175 getString(((Document)xmlNode).getDocumentElement(), xmlRepresentation, depth, pretty); 176 Document xmlDocNode = (Document)xmlNode; 177 178 if (xmlDocNode.getDoctype() == null) { 179 System.err.println("Doctype is null."); 180 } 181 else { 182 183 DocumentType dt = xmlDocNode.getDoctype(); 184 185 String name = dt.getName(); 186 String pid = dt.getPublicId(); 187 String sid = dt.getSystemId(); 188 189 String doctype_str = "<!DOCTYPE " + dt.getName() + " PUBLIC \"" + pid + "\"" + sid + "\">\n"; 190 191 xmlRepresentation.append(doctype_str); 192 } 193 getString(xmlDocNode.getDocumentElement(), xmlRepresentation, depth, pretty); 176 194 return; 177 195 }
Note:
See TracChangeset
for help on using the changeset viewer.