How to ‘XPATH’ this type of message?

Home Page Forums BizTalk 2004 – BizTalk 2010 How to ‘XPATH’ this type of message?

Viewing 1 reply thread
  • Author
    • #13444

      Thanks guys, I’ve attempted both paths and I receive the same value:

      [code:1:ff13b42d90]xsi:nil=\"true\" xmlns:xsi=\"\"[/code:1:ff13b42d90]

      This is the same result whether or not I have a valid error returned.

      Any ideas?


    • #13445

      Yes, I’ve validated it by saving the message as an XML doc and saving it out right before I run the query.

      • #13446

        Not sure exaclty the rules here:
        This xpath will return the value \”HP\” from your example if the <params> node contains a param with a name attribute of ‘mnDocumentOrderInvoice’
        [code:1:4f93931824]\"//params/param[@name = ‘mnDocumentOrderInvoice’]/parent::*/param[@name = ‘szErrorCode’]/text()\"[/code:1:4f93931824]

        • #13447

          Is the message exactly the same as the one posted earlier.
          Are there any namespaces involved.

          • #13448

            Can you email me your project, so I can take a look

            • #13449

              I have a new application that sends me a response message based on an INSERT operation call, and I’m looking to extract one point of data from this XML.

              SO, from an expression, how can I do the following:
              [code:1:9c3ee063a4]errCode = xpath(msgResp, ???)[/code:1:9c3ee063a4]

              from this XML message where I need to get the \”HP\” value returned when the \”name\” attrib = mnDocumentOrderInvoice\”?
              <?xml version=\"1.0\" encoding=\"UTF-8\"?>
              <param name=\"szCompanyKeyOrderNo\">12345</param>
              <param name=\"mnDocumentOrderInvoice\">9999999</param>
              <param name=\"szErrorCode\">HP</param>


              • #13450

                Hey Greg,

                Yes, the output is the exact same and there are no namespaces. I can compile and send you the schemas and example output if you’d like.

                Thanks again!

                • #13451

                  Here’s something I found…this was in the Event Viewer, and HAT blew up on me as well:

                  [code:1:bc03e84586]<param xmlns=”> was not expected.[/code:1:bc03e84586]

                  Again, from the actual output, there are no namespaces.


                  • #13452

                    Thanks Greg,

                    I ended up writing a helper class using the XmlDocument object with SelectSingleNode…unfortunately, I had to get this working in a much narrow time frame than I had originally thought.

                    If you’re still curious, as I am, I can loop back and put something together within the next few days.

                    Again, I truly appreciate the assistance.

                    • #13453


                      The following should work:

                      strResp = xpath(msg, \”/appResponse/callINSERT/params/param[@name=’szErrorCode’]\”);

                      • #13454

                        You shouldn’t be getting that. Are you *sure* that’s the instance document you’re running the query on? If you are getting all that other stuff, then the message certainly contains other stuff.

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