如何将嵌套的xml文件导入数据库

编程入门 行业动态 更新时间:2024-10-26 00:30:26
本文介绍了如何将嵌套的xml文件导入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 温馨的问候! 我陷入了问题&将xml文件导入到mysql表中. XML文件是嵌套的.我设法以某种方式创建了表,并从XML文件本身中提取了适当的列以适合数据类型,但是我没有任何想法如何将嵌套的XML文件导入到表中.

Hello everyone, Warm Regards! I''m stuck with a problem & that is importing an xml file into a mysql table. The XML file is nested. Somehow I managed to create the table with appropriate columns taken from XML file itself to suit the datatype but I don''t have any Idea how do I import a nested XML file into the table.

<Data> <supplyupdate> <a001>wiley-9780442205676</a001> <a002>12</a002> <productidentifier> <b221>03</b221> <b244>9780442205676</b244> </productidentifier> <b394>07</b394> <b003>19890201</b003> <supplydetail> <supplieridentifier> <j345>07</j345> <b244>0141534</b244> </supplieridentifier> <supplieridentifier> <j345>06</j345> <b244>5030670141531</b244> </supplieridentifier> <website> <b367>02</b367> <b295>www.wiley/WileyCDA/WileyTitle/productCd-0442205678.html</b295> </website> <j292>01</j292> <j397>WORLD</j397> <j140>AS AG AR AU BS BD BB BM BO BV BR BZ VG BN MM CA KY LK CL CN TW CO CR CU DO EC SV FK GS FJ GD GP GT GY HT HN HK IN ID IQ JM JO KP KR LA LB MY MQ MX MS NP AN AW NZ NI UM PA PG PY PE PH PR KN AI LC PM VC SG SD PM SR SY TH TT TC EG US VI UY VE YE</j140> <j399>The European Distribution Centre (EDC) typically supplies product to Europe, Middle-East, Africa (EMEA). Other territories are supplied by other worldwide Wiley subsidiaries. Please refer to www.wiley</j399> <j396>51</j396> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>50.5</j151> <j152>GBP</j152> <j153>Z</j153> <j154>00</j154> <j155>50.5</j155> <j156>00</j156> </price> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>69.95</j151> <j152>USD</j152> <j153>Z</j153> <j154>00</j154> <j155>69.95</j155> <j156>00</j156> </price> <price> <j148>07</j148> <j150>AWILE100</j150> <j151>82.3</j151> <j152>EUR</j152> <j153>Z</j153> <j154>00</j154> <j155>82.3</j155> <j156>00</j156> </price> </supplydetail> </supplyupdate> </Data>

如果有人知道如何制作,那么请,我非常感谢!! 我想补充一点,该文件的大小有点大,超过400 MB. 问候, Sunny K

If anyone knows how to make it then please, I appreciate any help !! I''d like to add that the file is a bit large in size of 400+MB. Regards, Sunny K

推荐答案

为什么不能解析xml并将数据推送到表中. 请参考以下链接,给出有关如何解析xml的想法 解析XML 读取XML [ ^ ] [ ^ ] 添加XML [ ^ ] why can''t you parse the xml and push the data to the table. Refer the following link gives an idea on how to parse an xml Parse XML Read XML[^][^] Prase XML[^]

更多推荐

如何将嵌套的xml文件导入数据库

本文发布于:2023-10-23 18:55:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1521718.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:嵌套   如何将   数据库   文件   xml

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!