首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

这样的XML如何读进数据库

2012-01-22 
这样的XML怎么读进数据库??xmlversion 1.0 encoding utf-8 ?rowid 0 name 总署 fullname

这样的XML怎么读进数据库?
<?xml   version= "1.0 "   encoding= "utf-8 "   ?>

<row   id= "0 "   name= "总署 "   fullname= "新闻出版总署 "   parent= "   1 "   no= "000000 ">
<row   id= "1 "   name= "北京 "   fullname= "北京市 "   parent= "0 "   no= "110001 "   memo= "京 ">
<row   id= "54 "   name= "东城区 "   fullname= "东城区 "   parent= "1 "   no= "100010 "   />
<row   id= "55 "   name= "西城区 "   fullname= "西城区 "   parent= "1 "   no= "100032 "   />
<row   id= "56 "   name= "崇文区 "   fullname= "崇文区 "   parent= "1 "   no= "100061 "   />
<row   id= "57 "   name= "宣武区 "   fullname= "宣武区 "   parent= "1 "   no= "100054 "   />
<row   id= "58 "   name= "朝阳区 "   fullname= "朝阳区 "   parent= "1 "   no= "100020 "   />
<row   id= "59 "   name= "丰台区 "   fullname= "丰台区 "   parent= "1 "   no= "100071 "   />
<row   id= "60 "   name= "石景山区 "   fullname= "石景山区 "   parent= "1 "   no= "100043 "   />
<row   id= "61 "   name= "海淀区 "   fullname= "海淀区 "   parent= "1 "   no= "100080 "   />
<row   id= "62 "   name= "门头沟区 "   fullname= "门头沟区 "   parent= "1 "   no= "102300 "   />
<row   id= "63 "   name= "房山区 "   fullname= "房山区 "   parent= "1 "   no= "102400 "   />
<row   id= "64 "   name= "通州区 "   fullname= "通州区 "   parent= "1 "   no= "101149 "   />
<row   id= "65 "   name= "顺义区 "   fullname= "顺义区 "   parent= "1 "   no= "101300 "   />
<row   id= "66 "   name= "昌平区 "   fullname= "昌平区 "   parent= "1 "   no= "102200 "   />
<row   id= "67 "   name= "大兴区 "   fullname= "大兴区 "   parent= "1 "   no= "102600 "   />
<row   id= "68 "   name= "怀柔区 "   fullname= "怀柔区 "   parent= "1 "   no= "101400 "   />
<row   id= "69 "   name= "平谷区 "   fullname= "平谷区 "   parent= "1 "   no= "101200 "   />
<row   id= "70 "   name= "延庆县 "   fullname= "延庆县 "   parent= "1 "   no= "102100 "   />
<row   id= "71 "   name= "密云县 "   fullname= "密云县 "   parent= "1 "   no= "101500 "   />
</row>
<row   id= "2 "   name= "上海 "   fullname= "上海市 "   parent= "0 "   no= "310001 "   memo= "沪 ">
<row   id= "35 "   name= "黄浦区 "   fullname= "黄浦区 "   parent= "2 "   no= "200002 "   />


<row   id= "36 "   name= "虹口区 "   fullname= "虹口区 "   parent= "2 "   no= "200080 "   />
<row   id= "37 "   name= "闸北区 "   fullname= "闸北区 "   parent= "2 "   no= "200070 "   />
<row   id= "38 "   name= "杨浦区 "   fullname= "杨浦区 "   parent= "2 "   no= "200082 "   />
<row   id= "39 "   name= "徐汇区 "   fullname= "徐汇区 "   parent= "2 "   no= "200030 "   />
<row   id= "40 "   name= "卢湾区 "   fullname= "卢湾区 "   parent= "2 "   no= "200020 "   />
<row   id= "41 "   name= "长宁区 "   fullname= "长宁区 "   parent= "2 "   no= "200050 "   />
<row   id= "42 "   name= "普陀区 "   fullname= "普陀区 "   parent= "2 "   no= "200063 "   />
<row   id= "43 "   name= "静安区 "   fullname= "静安区 "   parent= "2 "   no= "200040 "   />
<row   id= "44 "   name= "宝山区 "   fullname= "宝山区 "   parent= "2 "   no= "201900 "   />
<row   id= "45 "   name= "闵行区 "   fullname= "闵行区 "   parent= "2 "   no= "200240 "   />
<row   id= "46 "   name= "嘉定区 "   fullname= "嘉定区 "   parent= "2 "   no= "201800 "   />
<row   id= "47 "   name= "金山区 "   fullname= "金山区 "   parent= "2 "   no= "201500 "   />
<row   id= "48 "   name= "崇明县 "   fullname= "崇明县 "   parent= "2 "   no= "202150 "   />
<row   id= "49 "   name= "松江区 "   fullname= "松江区 "   parent= "2 "   no= "201600 "   />
<row   id= "50 "   name= "南汇区 "   fullname= "南汇区 "   parent= "2 "   no= "201300 "   />
<row   id= "51 "   name= "青浦区 "   fullname= "青浦区 "   parent= "2 "   no= "201700 "   />
<row   id= "52 "   name= "奉贤区 "   fullname= "奉贤区 "   parent= "2 "   no= "201400 "   />
<row   id= "53 "   name= "浦东新区 "   fullname= "浦东新区 "   parent= "2 "   no= "200120 "   />
</row>



[解决办法]
逐行放进去好了



[解决办法]
c:\kk.xml
[解决办法]
参考下SqlServer的如下三个存储过程:
sp_xml_preparedocument
OPENXML
sp_xml_removedocument

热点排行