Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

XML & DTD

Hi,
I have an application which will accept XML input.
I want to validate the XML file against a DTD which only the application
has access.

Normally if I use MSXML DOM Parser, then the DTD needs to be specified along
with the xml file.

In my case, I need to validate the input XML at run time against a DTD specified
by me.

I checked up MSXML DOM Help, but the parser's DocType property is read only.

Is it possible to validate at runtime against a chosen DTD?

Thanks
Umashankar
[552 byte] By [Umashankar] at [2007-11-9 15:22:31]
# 1 Re: XML & DTD
Umashankar,

The DOM's parser's DocType is read-only, but your XML's doctype is not. In
the the XML that you send to the DOM, you'll want to specify the DTD that
you want to validate against.

- jesse

"Umashankar" <umashankarpj@yahoo.com> wrote:
>
>Hi,
> I have an application which will accept XML input.
>I want to validate the XML file against a DTD which only the application
>has access.
>
>Normally if I use MSXML DOM Parser, then the DTD needs to be specified along
>with the xml file.
>
>In my case, I need to validate the input XML at run time against a DTD specified
>by me.
>
>I checked up MSXML DOM Help, but the parser's DocType property is read only.
>
>Is it possible to validate at runtime against a chosen DTD?
>
>Thanks
>Umashankar
Jesse at 2007-11-11 23:30:29 >