XSD output (Enforcing XML Closing Tags)
-
Hi all, I've used the VS XSD tool to handle the XML input/output. All seems well, however; the XML that needs to be delivered is on a different technology platform and it can't understand self closing tags like so: < myelement />. It only understands < myelement >< /myelement >. My problem is that I can't seem to enforce this using the XSD. Is there a way to do this? This happens on empty elements. I tried setting the default value to "" or " " and that didn't do the trick. Thanks all in advance.
-
Hi all, I've used the VS XSD tool to handle the XML input/output. All seems well, however; the XML that needs to be delivered is on a different technology platform and it can't understand self closing tags like so: < myelement />. It only understands < myelement >< /myelement >. My problem is that I can't seem to enforce this using the XSD. Is there a way to do this? This happens on empty elements. I tried setting the default value to "" or " " and that didn't do the trick. Thanks all in advance.
Ok I found one solution: 1) Don't return the tag at all if element is empty. LOL the obvious right. It's very silly for a parser not to understand self closing tags, but it's our client's app that is going to read our generated XML. While this works, I'm still very interested on other solutions as well. Thanks all in advance.