Viewing 2 posts - 1 through 2 (of 2 total)
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"...
September 5, 2010 at 10:41 pm
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)
August 8, 2010 at 8:24 am
Viewing 2 posts - 1 through 2 (of 2 total)