You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Eyum Otu <ey...@hotmail.com> on 2001/05/22 16:07:55 UTC

How to read entities in an external DTD?

Hi All,

I have an Xml application whose documents reference an external dtd for 
parsing through the DOCTYPE node. I will like to read values within the 
entities in the dtd either through the SAX API or DOM. How do I do that? Any 
help will be appreciated.

Regards,
Eyumotu

Extract from dtd:

<!ELEMENT PXapi (request | response) >
<!ATTLIST PXapi apiver CDATA #FIXED "1.1" >

<!-- parameter entities -->
<!ENTITY % valid_fcn "(AVG | SUM | MAX | MIN)" -->
<!ENTITY % valid_order "(ASC | DESC)" >

......................................
......................................

<!-- end of PXapi DTD -->




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: How to read entities in an external DTD?

Posted by Dean Roddey <dr...@charmedquark.com>.
The DOM information is not sufficient, and SAX doesn't pass all of that info
out either, though the new SAX2 passes out more than the original SAX. The
ultimate source, though it is non-standard, are the internal validator
enumeration APIs. See the EnumVal sample for how to use them. Just beware
that these are internal APIs and could change and certainly won't exist on
another parser in this form.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"Why put off until tomorrow what you can
put off until the day after tomorrow?"

----- Original Message -----
From: "Eyum Otu" <ey...@hotmail.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, May 22, 2001 7:07 AM
Subject: How to read entities in an external DTD?


> Hi All,
>
> I have an Xml application whose documents reference an external dtd for
> parsing through the DOCTYPE node. I will like to read values within the
> entities in the dtd either through the SAX API or DOM. How do I do that?
Any
> help will be appreciated.
>
> Regards,
> Eyumotu



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org