<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Parses an response XML string into a SolrObject</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.solrutils.html">SolrUtils</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrutils.escapequerychars.html">SolrUtils::escapeQueryChars</a></div> <div class="up"><a href="class.solrutils.html">SolrUtils</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="solrutils.digestxmlresponse" class="refentry"> <div class="refnamediv"> <h1 class="refname">SolrUtils::digestXmlResponse</h1> <p class="verinfo">(PECL solr >= 0.9.2)</p><p class="refpurpose"><span class="refname">SolrUtils::digestXmlResponse</span> — <span class="dc-title">Parses an response XML string into a SolrObject</span></p> </div> <div class="refsect1 description" id="refsect1-solrutils.digestxmlresponse-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type"><a href="class.solrobject.html" class="type SolrObject">SolrObject</a></span> <span class="methodname"><strong>SolrUtils::digestXmlResponse</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$xmlresponse</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$parse_mode</code><span class="initializer"> = 0</span></span> ] )</div> <p class="para rdfs-comment"> This method parses an response XML string from the Apache Solr server into a SolrObject. It throws a SolrException if there was an error. </p> </div> <div class="refsect1 parameters" id="refsect1-solrutils.digestxmlresponse-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">xmlresponse</code></em></span> <dd> <p class="para"> The XML response string from the Solr server. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">parse_mode</code></em></span> <dd> <p class="para"> Use SolrResponse::PARSE_SOLR_OBJ or SolrResponse::PARSE_SOLR_DOC </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-solrutils.digestxmlresponse-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the SolrObject representing the XML response. </p> <p class="para">If the parse_mode parameter is set to SolrResponse::PARSE_SOLR_OBJ Solr documents will be parses as SolrObject instances.</p> <p class="para">If it is set to SolrResponse::PARSE_SOLR_DOC, they will be parsed as SolrDocument instances.</p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.solrutils.html">SolrUtils</a></div> <div class="next" style="text-align: right; float: right;"><a href="solrutils.escapequerychars.html">SolrUtils::escapeQueryChars</a></div> <div class="up"><a href="class.solrutils.html">SolrUtils</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>