【问题标题】:Using php 5.0 to upload xml into Mysql database [closed]使用 php 5.0 将 xml 上传到 Mysql 数据库 [关闭]
【发布时间】:2012-06-10 22:09:45
【问题描述】:

我有一个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。有人可以帮忙吗?谢谢

【问题讨论】:

  • 所以编写查询并运行它。
  • 要保存字符串吗?您是否需要将所有元素保存到单独的列中?这里有什么要求?
  • 是的,我想将所有元素保存在单个表格的不同列中。
  • 到目前为止您尝试过什么?你有什么问题吗?
  • @sanjay - 如果你展示你的尝试,那么更多的人会帮助你

标签: php mysql xml


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2017-11-20
  • 2010-11-21
  • 2013-01-23
  • 2020-08-02
  • 2012-11-10
  • 2017-09-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多