Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: XML Schema problem

    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"...

  • RE: elements with and wothout namespaces

    this worked for me.

    ;WITH XMLNAMESPACES('http://www.crea.si/Schemas/2004/Document/ZBSxml/2.0' as cd, 'http://www.zbs-giz.si/Schemas/2006/ZBSxml/2.0' as a)

    select x.Paket.value('a:StevilkaRacunaNalogodajalca[1]', 'varchar(34)') AS StevilkaRacunaNalogodajalca

    --select x.Paket.query('.')

    from @x.nodes('//cd:Document/cd:Data/cd:Content/cd:EmbeddedData/a:Paket/a:VodilniZapis') AS x(Paket)

Viewing 2 posts - 1 through 2 (of 2 total)