XML Validation

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I have an XML which I am validating against the schema; I am using XMLReaderSettings validation event handler; the XML is like - <Books><Book1><Name>Test</Name><Author>TestAuthor</Author></Book1><Book2><Name>Test1</Name><Author>TestAuthor1</Author></Book2></Books>
Now when the validation fails - I am getting the failed element name as Name has failed, but not sure which is the parent element - is it Book1 or Book2, Is there a way I can get this info when the validation fails. while(reader.read()) validates element
by element. Please advice. Thanks.

<hr class="sig Rpaul

View the full article
 
Back
Top