Posted: Thu Jun 13, 2013 12:39 am Post subject: Unable to access child elements in XML with repetitive tags
Apprentice
Joined: 16 Feb 2013 Posts: 48
Hi,
I am trying to retrieve one of the child elements in the XML. The requirement is to check for an element for a particular child with 'Attribute' as "Short Description". Here I need to fetch the value '205' from the below XML input. But everytime I am getting only '203'. Please help.
SET OutputRoot.XMLNSC.root.row[rowCnt].Product_Info.description = THE (SELECT ITEM THE(SELECT ITEM itemMaster.*:ItemMasterHeader.*:Description FROM T.*:Description[] AS C WHERE C.(XMLNSC.Attribute)type = 'Short Description') FROM itemMaster.*:ItemMasterHeader[] AS T );
Posted: Thu Jun 13, 2013 12:53 am Post subject: Re: Unable to access child elements in XML with repetitive t
Acolyte
Joined: 06 Jan 2012 Posts: 72
Muthukrishnan wrote:
Code:
SET OutputRoot.XMLNSC.root.row[rowCnt].Product_Info.description = THE (SELECT ITEM THE(SELECT ITEM itemMaster.*:ItemMasterHeader.*:Description FROM T.*:Description[] AS C WHERE C.(XMLNSC.Attribute)type = 'Short Description') FROM itemMaster.*:ItemMasterHeader[] AS T );
You have posted a very similar question on a diferent thread. You also got a very nicely reworked query. If you having trouble understanding queries, try clasic reference parsing. While lastmove and next sibling.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum