Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to parse XML file using php
    primarykey
    data
    text
    <p>I want to parse the following xml and get the value of metadata:description using php</p> <p>I know how to get the value of title</p> <pre><code>$item_title = $x -&gt; item($i) -&gt; getElementsByTagName('title') -&gt; item(0) -&gt; childNodes -&gt; item(0) -&gt; nodeValue; </code></pre> <p>but can not use this way to get metadata:description</p> <pre><code>&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; </code></pre> <hr> <p>Original xml file link</p> <pre><code>http://www.cnbc.com/id/19838222/device/rss/rss.xml </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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. 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