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 Diego Fernandez <df...@intermedia.com.ar> on 2000/09/06 15:02:53 UTC

How to check the document type?

Hi,
I'm a newbie, in XML. Xerces and Java, and I trying to do an simple
viewer of DocBook XML files in Java (http://www.docbook.org) currently I
only want to show Simplified Docbook documents (the DTD, and a little
reference is in http://www.nwalsh.com), but I don't know how to limit my
application only to those documents.
How to check the DOCTYPE?
I try to extend the DOMParse making an instance of the startDTD method
but it didn't work. I see the getSystemId() and getPublicId() methods
but I don't know how to use it.
I think this should be a common task for an XML application... but I
don't see any samples of how to do this in the xml.apache web site.

Help!!!

Diego.-

PD: Sorry... I'm a spanish speaking person, and my english it's not
good... :-)


Re: How to check the document type?

Posted by Diego Fernandez <df...@intermedia.com.ar>.
Answering to my self.... :-)

It was easy: document.getDoctype().getPublicId();

Next time, I need to read a bit more the api documentation before posting a
question to the list...

Diego.-

Diego Fernandez wrote:

> Hi,
> I'm a newbie, in XML. Xerces and Java, and I trying to do an simple
> viewer of DocBook XML files in Java (http://www.docbook.org) currently I
> only want to show Simplified Docbook documents (the DTD, and a little
> reference is in http://www.nwalsh.com), but I don't know how to limit my
> application only to those documents.
> How to check the DOCTYPE?
> I try to extend the DOMParse making an instance of the startDTD method
> but it didn't work. I see the getSystemId() and getPublicId() methods
> but I don't know how to use it.
> I think this should be a common task for an XML application... but I
> don't see any samples of how to do this in the xml.apache web site.
>
> Help!!!
>
> Diego.-
>
> PD: Sorry... I'm a spanish speaking person, and my english it's not
> good... :-)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org