There is a new validator in .NET 2.0 called XmlSchemaValidator that takes an
XmlSchemaSet and then you can walk your object model calling methods like
ValidateElement and ValidateAttribute and so on and it will tell you about
any problems. To convert your DTD to XSD so you can add it to the
XmlSchemaSet you can use the Create Schema command in the XML editor in
Visual Studio 2005 or you can use the DTD2XSD tool on
http://www.gotdotnet.com/Community/U...B-A08911356AD7.
Enjoy!
"Jinsong Liu" <Ji*****@mssolution.com.nospam> wrote in message
news:3i********************************@4ax.com...
Hello Group:
Sorry for double post. I posted this question on the XML group. Then
realized this is the group where the question should be posted, since
I am using .NET.
I have an object model representing a XML document. At the end of the
process, a XML document will be generated based on the data hold by
the object model. I can validate the XML (when it is being generate)
against a DTD. Is that possible I can get access to the DTD and
validate object property values before the XML document get generate?
Thanks
JSL