Hi all,
I have the following XML file:
[CODE]<?xml version=”1.0″ encoding=”UTF-8″?>
<data>
<type>Customer Data</type>
<vars>
<payer-id>MPCUST1238495242′</payer-id>
<first-name>David</first-name>
<last-name>Hopkins</last-name>
<email-address>[email protected]</email-address>
<shipping-address>
<company>Outlook Images Ltd</company>
<street>7 Oakdale Court, Oakdale Business Park</street>
<city>Blackwood</city>
<county>Gwent</county>
<country>United Kingdom</country>
<post-code>NP12 4AD</post-code>
</shipping-address>
</vars>
</data>
I’ve loaded it into a XML object for handling like so:
[code=php]$xml = simplexml_load_file(‘customer.xml’);
I want to be able to loop through the entire file and use the addslashes() function on the data. Does anyone know how I would go about doing this?
Thanks!
dai.hop