472,127 Members | 1,432 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

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 1862
"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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.