Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8176751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:19:05+00:00 2026-06-06T23:19:05+00:00

I am familiar with SimpleXML and am now receiving a SOAP response from a

  • 0

I am familiar with SimpleXML and am now receiving a SOAP response from a client. I have tried reading as many examples as I can from reading it with SimpleXML, but I just cannot get mine to work! Can some one please show me a line of PHP that reads the DESCRIPTION node in the following code:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <GetPoliciesResponse xmlns="http://www.abraxas-uk.com/Abraxas/InsuranceWebsite/InsWebService/">
      <GetPoliciesResult>
        <Policies xmlns="">
          <Policy>
            <Description>Off-Pad Warranty</Description>
            <Plan />
          </Policy>
        </Policies>
      </GetPoliciesResult>
    </GetPoliciesResponse>
  </soap:Body>
</soap:Envelope>

I am pulling my hair out!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:19:07+00:00Added an answer on June 6, 2026 at 11:19 pm

    IIRC using SimpleXML with a document containing multiples XML namespaces is a mess.

    You could use DOM (ie. without XPath) :

    <?php
    
    $xml = '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
        <GetPoliciesResponse xmlns="http://www.abraxas-uk.com/Abraxas/InsuranceWebsite/InsWebService/">
          <GetPoliciesResult>
            <Policies xmlns="">
              <Policy>
                <Description>Off-Pad Warranty</Description>
                <Plan />
              </Policy>
            </Policies>
          </GetPoliciesResult>
        </GetPoliciesResponse>
      </soap:Body>
    </soap:Envelope>';
    
    $doc = DOMDocument::loadXml($xml);
    
    $desc = $doc->getElementsByTagName('Description')->item(0)->textContent;
    
    echo $desc;
    

    With a more complex case, you may have to use XPath instead of DOMNode::getElementsByTagName()

    http://www.php.net/manual/en/class.domxpath.php

    For your convenience, you could switch between the two worlds (DOM / Simplexml) :

    http://www.php.net/manual/en/function.simplexml-import-dom.php

    http://www.php.net/manual/en/function.dom-import-simplexml.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm familiar with C. Where I can write like this: uint array[0xFFFF][20]; But I've
People familiar with Homographies will know that you have to normalize it dividing by
Anyone familiar with a way how can I can i write something to the
I am familiar with the approach of retrieving a single file version from a
I am not terribly familiar with either tech, so bear with me. I have
Im familiar with asp.net web forms. I would now like to move on to
I am not very familiar with the OAuth flow and/or encoding, but I've managed
I am pretty familiar with jquery, but a novice at php, so excuse me
I am pretty familiar with ASP.Net MVC, now I want to try some Spring
Not familiar with c++, can someone help me add cmd to the myStr array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.