Export specific strings from xml to mysql table
<p><a href="http://i.stack.imgur.com/L3iF4.png" rel="nofollow">XML Codes</a></p>

<p>I have got a item list xml file for a game server, and I need to insert item names, id's and type of the item into a mysql server. I have provided 4 examples of situations, first has isstaffitem="true", second has iscashitem="true" third iscashitem="false" and fourth has nothing regarding item type. Now what I need is to read the id="string", name="string" and type of the item and insert into database. If it's staff item, set type as staff, if cash item set type to cash and set regular if something else.</p>

<p>How can I do that php ? I am trying with <code>$xml = simplexml_load_string($_POST['zitem']);</code> but can't get it work..</p>