debatching with xpath and namespaces please help

Home Page Forums BizTalk 2004 – BizTalk 2010 debatching with xpath and namespaces please help

Viewing 1 reply thread
  • Author
    Posts
    • #21762

      Hi to Gurus,

      I am trying to create instances of messages from a batch. This used to work but stopped when I changed the namespaces of the elements.

      How can I get the count of ClinicalNotificationDataStructure in the following XML :

      <ns0:PushClinicalNotificationData xmlns:ns0=”http://www.abc.com/1.0/PushClinicalNotificationData“>
        <ns1:ClinicalNotificationDataStructure xmlns:ns1=”http://www.abc/1.0/ClinicalNotificationDataStructure“>
          <PatchId>GpM7</PatchId>
          <Timestamp>1999-05-31T13:20:00.000-05:00</Timestamp>
          <Key>Key_0</Key>
          <Value>10</Value>
          <NotificationTypeCode>Normal</NotificationTypeCode>
        </ns1:ClinicalNotificationDataStructure> 
      </ns0:PushClinicalNotificationData>

      In my orchestration I used to do this

      count(//ClinicalNotificationDataStructure) This now returns 0 instead of 1…

      Please help me thank you

    • #21764

      Ok, I am able to get the count with this:

      nRecordCount = System.Convert.ToInt32(xpath(BatchClinicalValue, “count(/*[local-name()=’PushClinicalData’]/*[local-name()=’ClinicalDataStructure’])”));

      Now to debatch, I need to assign it to a message:

      Why isn’t this working in this case

      sXpath = System.String.Format(“[local-name()=’PushClinicalData’]/*[local-name()=’ClinicalDataStructure’][{0}]”,nLoopCount);

      ClinicalDataInstance = xpath(BatchClinicalValue, sXpath);

      Thank you

       

      • #21773

        Try:

        /*[local-name()=‘PushClinicalNotificationData’]/*[local-name()=‘ClinicalNotificationDataStructure’][{0}]   

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.