"Igor Dela" <ig********@infotehna-dot-si.no-spam.invalid> wrote in message news:40**********@Usenet.com...
Any idea how to do it? Some usefull class that i missed?
DTD validation is handled by the XmlValidatingReader. The default ValidationType, Auto,
should detect and validate a DTD, when present. To make your intentions explicit, you can
set the ValidationType to ValidationType.DTD (but this shouldn't ordinarily be required).
See the following help topic in the .NET Framework SDK documentation for an example:
..NET Framework SDK /
Programming with the .NET Framework /
Employing XML in the .NET Framework /
Validation of XML with Schemas /
Validation of XML with XmlValidatingReader /
Validation against DTD with the XmlValidatingReader
If you're not interested in validating, the parsed results of the internal DTD subset present in an
XML instance document are exposed through XmlDocument's DocumentType property. This
information is encapsulated in a largely read-only fashion by the XmlDocumentType class.
The entire internal DTD subset of a document can be replaced with a new one, but you can't make
specific edits. For instance, to redefine an individual ENTITY reference, &derek;, from "enlightened"
to "gurudom", is only possible by reparsing an entirely new internal DTD subset, because by the time
the DocumentType property was exposed to you to read and want to edit the ENTITY, the whole
XML document had already been processed [its entities replaced], and there's no efficient facility to
go back short of re-parsing.
Derek Harmon