Why getDoctype() returns null?

XelNugah

New Member
I have the following bookstore.xml file:\[code\]<?xml version="1.0" ?><!DOCTYPE Bookstore SYSTEM "assert/Bookstore.dtd"><Bookstore> <Book> ..... Some nodes here ..... </Book></Bookstore>\[/code\]With the following DTD:\[code\]<!ELEMENT Bookstore (Book | Magazine)*> <!ELEMENT Book (Title, Authors, Remark?)> .... etc ....\[/code\]So after i've loaded and parsed this XML in Java \[code\]xmlDocument.getDoctype()\[/code\] method return [Bookstore: null]. Where is my mistake and how to fix this?
 
Back
Top