Jordan C N Chong wrote:
> 
> Dear all,
> 
> Is there a way to check whether the XML document is existed before parsing
> it? And, how to relate the XML document with its DTD? Please help. Thanks.
> Wish you all the best.

I try to open the XML Document first by using an fstream.

And I use an EntityResolver to find the installed DTD. Here's some code
that does this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bakery/bakery_example_xml/src/

I find that the EntityResolver MUST check that the DTD is really there
because Xerces-C++ will not complain if the DTD is not found. You will
just have an empty DOM_Document.


-- 
Murray Cumming
www.murrayc.com
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to