Validate a subset of or only certain elements of an XML document?
Posted
by
Gaurav Dadhania
on Stack Overflow
See other posts from Stack Overflow
or by Gaurav Dadhania
Published on 2010-12-22T00:23:48Z
Indexed on
2010/12/22
0:54 UTC
Read the original article
Hit count: 191
I have this XML file (some of them are HUGE - thousands of elements) and I'm trying to validate certain elements of this XML file using an XSD schema. For eg. dates, etc. Now, the problem is that XSD won't let me validate just certain sections of the document. It wants definitions for EVERYTHING - and that would be quite painful. What I would like to know is that is there a way to XSD work with only certain elements of the document? I've tried any and anyAttribute to no avail. If not, how would you do this? Is there a library/script that produces a schema corresponding to an XML document which I can then modify according to my needs?
Thanks,
© Stack Overflow or respective owner