<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: simplexml code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 17 May 2008 21:50:21 GMT</pubDate>
    <description>DZone Snippets: simplexml code</description>
    <item>
      <title>Post to Jaiku using PHP</title>
      <link>http://snippets.dzone.com/posts/show/5259</link>
      <description>This example uses the ProjectX API to post to Jaiku.com&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;  $msg = 'this is just a test message using the ProjectX API for posting to Jaiku';&lt;br /&gt;&lt;br /&gt;  $xml_result =  simplexml_load_file('http://rorbuilder.info/api/projectx.cgi?xml_project=&lt;project name="jaiku"&gt;&lt;methods&gt;&lt;method name="post"&gt;&lt;params&gt;&lt;param var="user" val="jrobertson"/&gt;&lt;param var="msg" val="' . $msg . '"/&gt;&lt;param var="location" val="London"/&gt;&lt;param var="apikey" val="9ee6ffd165r364492"/&gt;&lt;/params&gt;&lt;/method&gt;&lt;/methods&gt;&lt;/project&gt;');&lt;br /&gt;  $method_result = $xml_result-&gt;post2jaiku;&lt;br /&gt;  echo 'result' . $method_result;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href="http://www.ibm.com/developerworks/library/x-simplexml.html"&gt;SimpleXML processing with PHP&lt;/a&gt; [ibm.com]</description>
      <pubDate>Wed, 19 Mar 2008 18:50:56 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5259</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Debugging SimpleXML Objects</title>
      <link>http://snippets.dzone.com/posts/show/493</link>
      <description>AGRH@!! SimpleXML bites the big one -- you can't even var_dump it to examine the contents and the controls are terrible. Luckily, you can convert it for debugging:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$sxml = simplexml_load_string($data);&lt;br /&gt;// .. much hate between then and now... //&lt;br /&gt;debugsxml($sxml);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function debugsxml($sxml) {&lt;br /&gt;    $dom = dom_import_simplexml($sxml);&lt;br /&gt;    printArray($dom);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function printArray($array){&lt;br /&gt;    echo '&lt;pre&gt;';&lt;br /&gt;    print_r($array);&lt;br /&gt;    echo '&lt;/pre&gt;';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;</description>
      <pubDate>Sat, 23 Jul 2005 04:59:27 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/493</guid>
      <author>ahoyhere (Amy Hoy)</author>
    </item>
  </channel>
</rss>
