MapTools.org

[Chameleon] Problem interpreting results from CatalogSearch widget

Hans Verlouw Hans.Verlouw@Geodan.nl
Tue, 04 Nov 2003 19:42:46 +0100
--=====================_35018223==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

I have a problem interpreting results from the Catalog Search widget.
Don't know if it's a Chameleon problem or PHP problem,
but when I get results from the catalog server 
($oXMLDoc->searchResponse->value->searchStatus->attributes['numberOfRecords']  
 > 0)
I cannot retrieve the subelements of array ISO19119 in the XML doc.
The core of the original code goes like:

$nbIso = 
count($oXMLDoc->searchResponse->value->searchResults->value->ISO19119);
for($i=0; $i < $nbIso; $i++)
{
      $oRes =& 
$oXMLDoc->searchResponse->value->searchResults->value->ISO19119[$i];
      $szLayerTitle    = $oRes->value->citation->value->title->value;
      echo $szLayerTitle;
}

So I can interprete the response I get up to the level 
of   $oXMLDoc->searchResponse->value->searchStatus
but not deeper.
My query was fulll response, so URL parameter ESN=f
Can somebody tell me what is wrong here?

Thanks in advance,


Hans Verlouw
-------------------------------------
Geodan SDT b.v.
Buitenhaven 27-A
5211 TP 's-Hertogenbosch (NL)
-------------------------------------
Tel: +31 (0)73 - 692 5151
Fax:  +31 (0)73 - 692 5150
-------------------------------------
Postadres / mailing address
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
E-mail: Hans.Verlouw@Geodan.nl
Website: www.geodan.nl
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------

--=====================_35018223==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
I have a problem interpreting results from the Catalog Search
widget.<br>
Don't know if it's a Chameleon problem or PHP problem,<br>
but when I get results from the catalog server
($oXMLDoc-&gt;searchResponse-&gt;value-&gt;searchStatus-&gt;attributes['numberOfRecords']
&gt; 0)<br>
I cannot retrieve the subelements of array ISO19119 in the XML doc.<br>
The core of the original code goes like:<br><br>
<tt>$nbIso =
count($oXMLDoc-&gt;searchResponse-&gt;value-&gt;searchResults-&gt;value-&gt;ISO19119);<br>
for($i=0; $i &lt; $nbIso; $i++)<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp; $oRes =&amp;
$oXMLDoc-&gt;searchResponse-&gt;value-&gt;searchResults-&gt;value-&gt;ISO19119[$i];<br>
&nbsp;&nbsp;&nbsp;&nbsp; $szLayerTitle&nbsp;&nbsp;&nbsp; =
$oRes-&gt;value-&gt;citation-&gt;value-&gt;title-&gt;value;<br>
&nbsp;&nbsp;&nbsp;&nbsp; echo $szLayerTitle;<br>
}<br><br>
</tt>So I can interprete the response I get up to the level
of&nbsp;&nbsp;
$oXMLDoc-&gt;searchResponse-&gt;value-&gt;searchStatus<br>
but not deeper.<br>
My query was fulll response, so URL parameter ESN=f<br>
Can somebody tell me what is wrong here?<br><br>
Thanks in advance,<br><br>
<x-sigsep><p></x-sigsep>
Hans Verlouw<br>
-------------------------------------<br>
Geodan SDT b.v.<br>
Buitenhaven 27-A<br>
5211 TP 's-Hertogenbosch (NL)<br>
-------------------------------------<br>
Tel: +31 (0)73 - 692 5151<br>
Fax:&nbsp; +31 (0)73 - 692 5150<br>
-------------------------------------<br>
Postadres / mailing address<br>
President Kennedylaan 1<br>
1079 MB Amsterdam (NL)<br>
-------------------------------------<br>
E-mail: Hans.Verlouw@Geodan.nl<br>
Website:
<a href="http://www.geodan.nl/" eudora="autourl">www.geodan.nl</a><br>
Disclaimer:
<a href="http://www.geodan.nl/disclaimer" eudora="autourl">www.geodan.nl/disclaimer</a><br>
-------------------------------------<br>
</html>

--=====================_35018223==_.ALT--



This archive was generated by Pipermail.