Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use <a href="http://php.net/manual/en/simplexml.examples-basic.php" rel="nofollow">SimpleXML</a></p> <pre><code>$xmlstr='&lt;item&gt; &lt;title&gt;Jobs: Bullish Economy Confirmed?&lt;/title&gt; &lt;metadata:title xmlns:metadata="http://search.cnbc.com/rss/2.0/modules/siteContentMetadata"&gt;Jobs: Bullish Economy Confirmed? 06 Jan 2012&lt;/metadata:title&gt; &lt;description&gt;Discussing whether the better than expected jobs number point to an economic rebound, and where to invest in this market, with Michael Farr, Farr, Miller, &amp;amp; Washington president.&lt;/description&gt; &lt;metadata:description xmlns:metadata="http://search.cnbc.com/rss/2.0/modules/siteContentMetadata"&gt;&lt;![CDATA[&lt;div class="rss_image" style="float:left;padding-right:10px;"&gt;&lt;img border="0" vspace="0" hspace="0" width="93" src="http://thumbnails.cnbc.com/VCPS/Y2012/M01D06/3000066213/6ED1-KR-Jobs_sm.jpg"&gt;&lt;/div&gt;&lt;div class="rss_abstract" style="font:Arial 12px;width:100%;float:left;clear:both"&gt;Discussing whether the better than expected jobs number point to an economic rebound, and where to invest in this market, with Michael Farr, Farr, Miller, &amp;amp; Washington president.&lt;/div&gt;]]&gt;&lt;/metadata:description&gt; &lt;pubDate&gt;Sat, 07 Jan 2012 00:24 GMT&lt;/pubDate&gt; &lt;guid isPermaLink="false"&gt;http://www.cnbc.com//id/15840232?video=3000066213&amp;amp;play=1&lt;/guid&gt; &lt;link&gt;http://www.cnbc.com//id/15840232?video=3000066213&amp;amp;play=1&lt;/link&gt; &lt;/item&gt;'; $x= new SimpleXMLElement($xmlstr); echo $x-&gt;title; $nss = $x-&gt;getNameSpaces(true); $metadata = $x-&gt;children($nss['metadata']); echo $metadata-&gt;title, "\n"; echo $metadata-&gt;description, "\n"; </code></pre> <p>Output</p> <pre><code>Jobs: Bullish Economy Confirmed?Jobs: Bullish Economy Confirmed? 06 Jan 2012 &lt;div class="rss_image" style="float:left;padding-right:10px;"&gt;&lt;img border="0" vspace="0" hspace="0" width="93" src="http://thumbnails.cnbc.com/VCPS/Y2012/M01D06/3000066213/6ED1-KR-Jobs_sm.jpg"&gt;&lt;/div&gt;&lt;div class="rss_abstract" style="font:Arial 12px;width:100%;float:left;clear:both"&gt;Discussing whether the better than expected jobs number point to an economic rebound, and where to invest in this market, with Michael Farr, Farr, Miller, &amp;amp; Washington president.&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload