Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

walking DTD 1

Status
Not open for further replies.

Cagliostro

Programmer
Sep 13, 2000
4,226
GB
Hi,
How can I walk a DTD using MSXML4? Ion Filipski
1c.bmp


filipski@excite.com
 
You can send me samples in VBA or C++. Ion Filipski
1c.bmp


filipski@excite.com
 
Walking a DTD is very tough, as it isn't a valid XML document. You'll probably have to write a program to do it via ordinary file system access.

An XSD schema is much easier to parse with a DOM, plus provides much tighter control over the contents of it's XML documents.

Chip H.
 
Thanks for that. Is it possible to use any other parsers to walk a DTD? Ion Filipski
1c.bmp


filipski@excite.com
 
Nope. The point was that a DTD can't be reliably parsed, as it's not an XML document.

You'll have to open your foobar.dtd with your programming language's equivalent to OpenFile(), read each line using the equivalent to ReadLine(), and close it using the equivalent to CloseFile(). In other words, the hard way.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top