validating XML in .NET
-
I need to validate an XML document against a schema, but I'm not having much luck finding a complete example in MSDN. This is the pseudo code of what I want to do:
XMLValidater xVal = new XMLValidater("my dtd, etc..."); XMLDocument xDoc = new XMLDocument("my XML doc"); if (xVal.Validate(xDoc)) //can now use XML document in rest of system
Help would be cool. Cheers, Simon X-5 452 rules. -
I need to validate an XML document against a schema, but I'm not having much luck finding a complete example in MSDN. This is the pseudo code of what I want to do:
XMLValidater xVal = new XMLValidater("my dtd, etc..."); XMLDocument xDoc = new XMLDocument("my XML doc"); if (xVal.Validate(xDoc)) //can now use XML document in rest of system
Help would be cool. Cheers, Simon X-5 452 rules.I haven't looked at it but isn't XmlValidatingReader what you need?