-7

我有一个xml如下-

<?xml version="1.0" encoding="UTF-8"?>
<result>
<item>
    <mid>2557</mid>
    <merchantname>DVD Players</merchantname>
    <linkid>1000012</linkid>
    <createdon>2006-09-30/20:04:17</createdon>
    <sku> JR-E-12324</sku>
    <productname>Sony Blu-Ray DVD Player</productname>
    <category>
        <primary>Electronics</primary>
        <secondary>TV . Video</secondary>
    </category>
    <price currency="JPY">59704</price>
    <upccode>4901340995017</upccode>
    <description>
        <short>Awesome Pictures</short>
        <long>Watch all your HD-DVDs</long>
    </description>
    <keywords>DVD Player~~BluRay~~SONY</keywords>
    <linkurl>http://somelink.com</linkurl>
    <imageurl>image.gif</imgurl>
</item>

我需要将上面的xml上传到mysql表sing php。有人可以帮忙吗?谢谢

4

1 回答 1

1

试试 SimpleXML 的加载字符串方法

于 2012-06-06T20:43:00.650 回答