Groups | Blog | Home
all groups > dotnet xml > april 2004 >

dotnet xml : Validating XML with XSD's


Matt
4/21/2004 3:45:17 PM
I have written a small app that uses the XmlValidationReader and a customer
ValidationEventHandler function. When I validate the XML I get detail
structured information like child is not defined or structure is invalid but
now I am getting into facets. I am working with data lengths and I have
found that I get the following message when a value is the incorrect length:
"The 'elementname' element has an invalid value according to its data type.
The real error is that the data value is longer than allowed. In XML Spy I
receive the follwing error for this scenario: "Value Does Not Match facet
maxlength="4" in element 'elementname'. How can I or can I get the same
type of information in .Net?

Thanks,

Matt

Dare Obasanjo [MSFT]
4/22/2004 6:01:57 PM
The XmlValidatingReader does not provide that level of granularity in its
error messages.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Matt
4/23/2004 9:12:42 AM
So, Is there something that does in .Net?

[quoted text, click to view]

AddThis Social Bookmark Button