How to disallow empty string elements using XML Schema?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jan-Erik Öhman

    #1

    How to disallow empty string elements using XML Schema?

    Hi.
    I want to do something like
    <root>
    <n>Some text only</n>
    </root>

    I wan't to define a schema that disallows the following xml-files:
    <root>
    <n/>
    </root>
    and
    <root>
    <n></n>
    </root>

    where the node 'n' is specified in the schema as xsd:string.

    Is this possible? I haven't figured out how to do this.

    Anyone know how to do this?

    Thanks in advance, Jan-Erik
Working...