Hi all,
I'm parsing an xml data type to import those data into a table. My current
approach is:
Declare @xDoc Xml
Set @xDoc = some xml
Set @sReferenciaID = @xDoc.value('declare namespace
ns="
http://Homex.WS.FacturacionElectronica.DataTypes/2007/12";
/ns:OrdenAceptacion/ns:Addenda/ns:ReferenciaID)[1]', 'varchar(max)')
Set @sAlmacenCodigo = @xDoc.value('declare namespace
ns="
http://Homex.WS.FacturacionElectronica.DataTypes/2007/12";
(/ns:OrdenAceptacion/ns:Addenda/ns:AlmacenCodigo)[1]', 'varchar(max)')
...
But there are dozens of such fields! It is a little boring to type all that
stuff, specially the namespace over and over again. May be is it another
more compact way to write this?
I feel should be something like: