469,299 Members | 2,066 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

DTD parsing?

Any idea how to do it? Some usefull class that i missed?

Thx in advance!
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 12 '05 #1
2 1767
"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
Nov 12 '05 #2
Thx for ur answer but i've already tried to use that DocumentType
property but i couldn't get any element with it :roll: I could get
entities, attributes or notations but not elements?! So i gave that
up, found wutka's DTD parser (www.wutka.com/dtdparser.html),
converted it into J# project to get dll and now im pretty happy with
it :)
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Gerrit Holl | last post: by
16 posts views Thread by Terry | last post: by
9 posts views Thread by ankitdesai | last post: by
5 posts views Thread by randy | last post: by
13 posts views Thread by Chris Carlen | last post: by
7 posts views Thread by Daniel Fetchinson | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.