Solved

Need XSLT

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
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. 
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now