Welcome Guest, Not a member yet? Register   Sign In
Problem with XML

In the project i'm currently working on I get the following XML returned:

$response = '
<?xml version="1.0" encoding="UTF-8"?>
<epp >
    <result code="1000">
      <msg>Command completed successfully</msg>
          <domain:name avail="true">DOMAINNAME.be</domain:name>

I need the value of the 'avail' attribute, so i make it a DOMXPath object:

$dom = new DOMDocument();
$dom->formatOutput = true;
$responsexPath = new DOMXPath($dom);

And use the following query:
$result = $responsexPath->query('/epp/response/resdata/domain:chkdata/domain:cd/domain:[email protected]');

Without any success =(

What am I doing wrong and what is the right way to get the value of the 'avail' attribute?

Messages In This Thread
Problem with XML - by El Forum - 12-01-2010, 09:43 AM

Theme © iAndrew 2016 - Forum software by © MyBB