XML Schema problem

  • jk

  • thanks to jacob sir

    i miss the <sequence> under first <complexType>

  • The below code should work. You were missing a <sequence> after a <complexType>. You can't have an <element> after <complexType>.

    CREATE XML SCHEMA COLLECTION UserRoleConsumerSchema AS '

    <schema xmlns="http://www.w3.org/2001/XMLSchema">

    <element name="UserRoleConsumers">

    <complexType>

    <sequence>

    <element name="UserRoleConsumer">

    <complexType>

    <sequence>

    <element name="ConsumerID" minOccurs="1" maxOccurs="1" />

    <element name="RoleConsumerID" minOccurs="1" maxOccurs="1" />

    </sequence>

    </complexType>

    </element>

    </sequence>

    </complexType>

    </element>

    </schema>'

    GO

  • Use Visual studio whenever you build xml schamas. This will avoid such kind issues being populated.

    otherwise you can use EditiX Lite Free Version to build schemas.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply