title: Get Json Value within XML - PHP
body: <p>Say I have the following php:</p>
  
  <pre><code>$Url = sprintf( "http://www.wowhead.com/item=%u?xml", $EntryId );
  $Xml = file_get_contents( $Url );   
  //echo htmlentities($Xml, ENT_COMPAT, 'UTF-8');     
  $Xml = simplexml_load_string( $Xml);
  </code></pre>
  
  <p>and lets say this is the xml:</p>
  
  <pre><code>http://www.wowhead.com/item=31065?xml
  </code></pre>
  
  <p>I know if T want say DisplayID I can do:</p>
  
  <pre><code>$DisplayId = $Xml-&gt;item-&gt;icon["displayId"];
  </code></pre>
  
  <p>However I want to get the values within the <code>&lt;json&gt;</code> part of the file.</p>
  
  <pre><code>&lt;json&gt;
      &lt;![CDATA[
      "armor":464,"classs":4,"displayid":117596,"id":31064,"level":146,"name":"3Hood of         Absolution","reqclass":16,"reqlevel":70,"slot":1,"slotbak":1,"source":[5],"sourcemore":    [{"n":"Tydormu","t":1,"ti":23381}],"specs":[258],"subclass":1
      ]]&gt;
  &lt;/json&gt;
  </code></pre>
  
  <p>I want to get the <code>slotbak</code> value, but I'm unsure how to do it. I did <code>echo htmlentities($Xml, ENT_COMPAT, 'UTF-8');</code> to ensure I'm getting the xml file fine, and I am. But when I use <code>json_decode</code> or <code>json_encode</code> it tends to just either return <code>{ } { } { }</code> or simply the object and not the value.</p>
  
  <p>Does anyone know how I can do this?</p>