Solved

Need XSLT

Posted on 2014-03-31
1
344 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Removing information on Duplicate XML Nodes 24 81
C# SQL BULK INSERT CLASS 5 49
Configure a Bean in an XML file 4 42
tutorial for ebay api 3 56
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 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