Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

XML Transformation help required

Former Member
0 Kudos

Hi,

I want to read the contents of XML file, so i want to use Transformation. I require your help in getting that.

XML File contents

- <SOAP_FAULT>
- <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <s:Header>
  <a:Action s:mustUnderstand="1">http://www.aaaa/bbbb/ccccc/ServiceUnavailableFault</a:Action> 
  <a:RelatesTo>urn:uuid:18a90558-58e4-1ee0-b5b6-4406eadff48f</a:RelatesTo> 
- 
- <u:Timestamp u:Id="_0">
  <u:Created>2011-09-02T22:23:11.917Z</u:Created> 
  <u:Expires>2011-09-02T22:28:11.917Z</u:Expires> 
  </u:Timestamp>
  
  </s:Header>
- <s:Body>
- <s:Fault>
- <s:Code>
  <s:Value>s:Sender</s:Value> 
  </s:Code>
- <s:Reason>
  <s:Text xml:lang="en-US">No recipients found</s:Text> 
  </s:Reason>
+ <s:Detail>
- <ServiceUnavailableFault xmlns="http://www.aaabbbccc.com/AONI/2/0/messages/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <RequestId>18a90558-58e4-1ee0-acc4-b45d6629582d</RequestId> 
  </ServiceUnavailableFault>
  </s:Detail>
  </s:Fault>
  </s:Body>
  </s:Envelope>
  </SOAP_FAULT>

Here i want to read the tag <Reason> which is currenlyt displaying as "No recipients found".

could you please help me in getting this..?

Thaks,

Raghu

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

if you just need to extract one element (?), you could use iXML : interface if_ixml_document contains method find_from_path_ns , to which you may pass the path to your element (and pass the namespace prefix too), which is :

/SOAP_FAULT/s:Envelope/s:Body/s:Fault/s:Reason

Sandra

Former Member
0 Kudos

Thanks