R
ranma79
Hi,
I was wondering if anyone knows if this is possible. I have the
following simple xml document as follows:
<test>
<field1>Value1</field1>
<field2>Value2</field2>
</test>
I would like to create an XSD which validates that if the "field1"
element contains a value, then "field2" must also contain a value. And
also the other way around, if "field2" contains a value, then "field1"
must contain a value. However, if both fields do not contain values
then no validation errors occur. Any ideas? Thanks!
I was wondering if anyone knows if this is possible. I have the
following simple xml document as follows:
<test>
<field1>Value1</field1>
<field2>Value2</field2>
</test>
I would like to create an XSD which validates that if the "field1"
element contains a value, then "field2" must also contain a value. And
also the other way around, if "field2" contains a value, then "field1"
must contain a value. However, if both fields do not contain values
then no validation errors occur. Any ideas? Thanks!