You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by th...@telenor.com on 2000/10/11 12:30:28 UTC

Document.getDocType() returns null from parsed document

Hi

I'm experiencing problems trying to get the document type from a parsed
document. 
When I use the getDocType()-method on my document I get null. My
DocumentImpl is 
extended to create my own line of elements extended from ElementImpl. I have
an
extended DOMParser that sets the document class name.

Having read Thomas Benslers answer to Nageswara Rao Vankayala question 
'Help with getting Doctype' written in May this year I think this problem is
related.

However his solution to the problem was given from version 1.0.3. I tried to
do 
the same as he did by setting the 'fDocumentImpl = (DocumentImpl)
fDocument;' 
in the startDocument()-method of the extended DOMParser.

When I did this I got my document type, but sadly my implementation of the 
'DocumentImpl.createElement(String tagName)'-method was not called anymore 
and I got ClassCastException when trying to cast the elements to my specific
types.

Does anyone have a clue to what I need to do in order to the get the
document type
object from the an extended DocumentImpl implementation?

have a nice day
ThorĂ…ge
--
Telenor Mobil, Tlf: 22 78 47 59, Mob: 95 94 75 64,
thor-age.eldby@telenor.com
"All suspects are guilty! Otherwise they wouldn't be suspects; would they?"