2 Replies Latest reply: Jan 21, 2013 4:04 AM by Rakesh JS RSS

    how to transform xml based on name field

    Rakesh JS
      hi All,

      i have a source xml with multiple occurances of an element 'property' and i need to find a value of one of the element[i] ('InterchangeReceiverID') based on its 'name' attribute. could you please tell how my xsl should be to achieve this transformation. below is the section of the input xml for this case... So for eg.. i need to get 183503259 using the name: InterchangeReceiverID and get 006981815 using the name GroupSenderID


      <?xml version="1.0" encoding="UTF-8"?>
      <Transaction-997 xmlns="urn:oracle:integration:b2b:X12/997"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      XDataVersion="2.0" Standard="X12" Version="V4030"
      CreatedDate="2013-01-18T04:53:19" CreatedBy="XEngine_2956"
      GUID="{45195CD4-615D-11E2-A9D6-0021F6000011}">
      <Internal-Properties>
      <Data-Structure Name="Interchange">
      <Lookup Name="InterchangeControlVersion">00401</Lookup>
      <Lookup Name="InterchangeReceiverID">183503259</Lookup>
      <Lookup Name="InterchangeReceiverQual">01</Lookup>
      <Lookup Name="InterchangeSenderID">006981815</Lookup>
      <Lookup Name="InterchangeSenderQual">01</Lookup>
      <Lookup Name="InterchangeUsageIndicator">P</Lookup>
      <Lookup Name="Standard">X12</Lookup>
      <Property Name="ElementDelimiter">0x7e</Property>
      <Property Name="InterchangeAckRequested">0</Property>
      <Property Name="InterchangeAuthorizationInfo"></Property>
      <Property Name="InterchangeAuthorizationInfoQual">00</Property>
      <Property Name="InterchangeChildCount">1</Property>
      <Property Name="InterchangeComponentElementSep">0x2a</Property>
      <Property Name="InterchangeControlNumber">000000543</Property>
      <Property Name="InterchangeControlStandard_RepeatingSeparator">U</Property>
      <Property Name="InterchangeControlVersion">00401</Property>
      <Property Name="InterchangeDate">021104</Property>
      <Property Name="InterchangeReceiverID">183503259</Property>
      <Property Name="InterchangeReceiverQual">01</Property>
      <Property Name="InterchangeSecurityInfo"></Property>
      <Property Name="InterchangeSecurityInfoQual">00</Property>
      <Property Name="InterchangeSenderID">006981815</Property>
      <Data-Structure Name="Group">
      <Lookup Name="GroupReceiverID">183503259</Lookup>
      <Lookup Name="GroupSenderID">006981815</Lookup>
      <Lookup Name="GroupVersionNumber">004010</Lookup>
      <Property Name="GroupAgencyCode">X</Property>
      <Property Name="GroupChildCount">1</Property>
      <Property Name="GroupControlNumber">543</Property>
      <Property Name="GroupDate">20021104</Property>
      <Property Name="GroupID">FA</Property>
      <Property Name="GroupReceiverID">183503259</Property>
      <Property Name="GroupSenderID">006981815</Property>
      <Property Name="GroupTime">1542</Property>
      <Property Name="GroupTrailerControlNumber">543</P