Using DTDs in Microsoft .NET

Stylus Studio® includes the ability to access the DTD parsing technology that Microsoft has implemented and distributed over the years. For example, to validate XML documents against DTDs, the following are included:

  • Microsoft MSXML 4.0 DOM Parser
  • Microsoft MSXML 6.0 DOM Parser
  • Microsoft .Net System.Xml Parser

DTD Parsing with .Net

Both the Microsoft MSXML family of DLLs and the Microsoft .Net architecture support DTD parsing and validation. For example, to read a file while enabling DTD usage, the following .Net code fragments might be helpful:

DTD Parsing with Visual Basic

Dim settings As New XmlReaderSettings()
settings.ValidationType = ValidationType.DTD ' turn DTD Validation on
Dim reader As XmlReader = XmlReader.Create("book.xml", settings)

DTD Parsing with C#

XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.DTD; // turn DTD Validation on
XmlReader reader = XmlReader.Create("book.xml", settings);

Where to get the Parsers

If, for some reason, you machine is lacking one or more of these (which is unlikely, since they are usually part of some larger installation package or Microsoft update, but still happens sometimes), here are some pointers to the downloads from Microsoft:

  • If your machine does not include MSXML 4, you can retrieve a copy from Microsoft here.
  • MSXML 6 is available from Microsoft here.
  • The .Net version comes with the .Net distribution package, version 2.0 of which can be downloaded from here.

Where to get Stylus Studio®

Get your red-hot copy of Stylus Studio® and begin designing and working with DTDs, and your parsers will have something to parse!

XQuery Activist Kit

Help us get the word out! This "XQuery for All" activist's kit will help you get educated about the importance of XQuery and to serve as an important rallying point for the community of Microsoft XML developers who have lost their right to XQuery.

Converting Static HTML to XML

This video tutorial covers how to convert static HTML to XML.

XML Document Wizards

Stylus Studio XML Document Wizards help you easily convert EDI, flat files, and other document formats to industry-standard XML.

XSL:FO Editor

The XSL-FO editor provides syntax help, code completion integrated PDF preview, and integration with industry-leading XSL-FO processors including RenderX XEP and Apache FOP. Simplify XSL FO development with Stylus Studio.

Stylus Most Wanted

PURCHASE STYLUS STUDIO ONLINE TODAY!!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Try Stylus DTD Generator

Generate DTDs with our award-winning DTD conversion and DTD generation utilities - Download a free trial!

Learn Stylus Studio in 6 Minutes

Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!

Ask Someone You Know

Does your company use Stylus Studio? Do your competitors? Engineers from over 100,000 leading companies use Stylus Studio, and now you can ask someone from your own organization about their experiences using Stylus Studio.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.