Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. XSD output (Enforcing XML Closing Tags)

XSD output (Enforcing XML Closing Tags)

Scheduled Pinned Locked Moved XML / XSL
visual-studioxmlhelpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tranzformerz
    wrote on last edited by
    #1

    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.

    T 1 Reply Last reply
    0
    • T tranzformerz

      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.

      T Offline
      T Offline
      tranzformerz
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups