Solved

Need XSLT

Posted on 2014-03-31
1
342 Views
Last Modified: 2016-02-26
Hi,

I am getting a SOAP response like below:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
      <s:Header>
            <a:Action s:mustUnderstand="1">http://abcde/2011/02/25/abcde/abcde/abcde</a:Action>
      </s:Header>
      <s:Body>
            <StoreEventResponse xmlns="http://abcde/2011/02/25/abcde">
                  <StoreEventResult xmlns:b="http://abcde/2011/02/25/abcde" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                        <b:Status>Successful</b:Status>
                        <b:TransmissionUID>63564440526</b:TransmissionUID>
                        <b:Messages xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                        <b:InternalUID>99f8a29e-9bc7-43c3-a0ef-e03d5f69cdd3</b:InternalUID>
                  </StoreEventResult>
            </StoreEventResponse>
      </s:Body>
</s:Envelope>

I need a XSLT to extract the below:

<StoreEventResponse xmlns="http://abcde/2011/02/25/abcde">
                  <StoreEventResult xmlns:b="http://abcde/2011/02/25/abcde" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                        <b:Status>Successful</b:Status>
                        <b:TransmissionUID>63564440526</b:TransmissionUID>
                        <b:Messages xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                        <b:InternalUID>99f8a29e-9bc7-43c3-a0ef-e03d5f69cdd3</b:InternalUID>
                  </StoreEventResult>
            </StoreEventResponse>

Please help.

Regards
Pradeep
0
Comment
Question by:Pradeep0308
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 39966269
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
    
    <xsl:template match="/" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
        <xsl:copy-of select="//s:Body/*"/>
    </xsl:template>
    
</xsl:stylesheet>

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question