易截截图软件、单文件、免安装、纯绿色、仅160KB

SQLServer2005分解并导入xml文件

  SQLServer2005分解并导入xml文件 收藏
测试环境SQL2005,windows2003
DECLARE @idoc int;
DECLARE @doc xml;
 
SELECT @doc=bulkcolumn from OPENROWSET(
   BULK 'D: \test.xml',
   SINGLE_BLOB) AS x
 
EXEC sp_xml_preparedocument @Idoc OUTPUT, @doc
 
 SELECT * into #temp from OPENXML (@Idoc, '/Root/Item',2)
   WITH (
            [ID] varchar(10)
           ,[Name]varchar(10)
           ,[Caption]varchar(10)
         )
select * from #temp
drop table #temp
/**//*--文件D: est.xml的文本内容
<?xml version="1.0" encoding="UTF-8"?>
<Root>
  <Item>
    <ID>1</ID>
    <Name>jinjazz</Name>
    <Caption>剪刀</Caption>
  </Item>
  <Item>
    <ID>2</ID>
    <Name>zswang</Name>
    <Caption>伴水</Caption>
  </Item>
</Root>
*/
/**//*---查询结果
ID         Name       Caption
---------- ---------- ----------
1          jinjazz    剪刀
2          zswang     伴水
*/
 
 


相关文档:

如何 使用 java 操纵 XML 文件


Introduction to XML and XML With Java  
 
If you are looking for sample programs to parse a XML file using DOM/SAX parser or looking for a program to generate a XML file please proceed directly to programs.
This small tutorial introduces you to the basic concepts of XML and using Xer ......

C++的XML编程经验――LIBXML2库使用指南

写这篇文章的原因有如下几点:1)C++标准库中没有操作XML的方法,用C++操作XML文件必须熟悉一种函数库,LIBXML2是其中一种很优秀的XML库,而且它同时支持多种编程语言;2)LIBXML2库的Tutorial写得不太好,尤其是编码转换的部分,不适用于中文编码的转换;3)网上的大多数关于Libxml2的介绍仅仅是翻译了自带的资料,没有详细介 ......

Sqlserver得到汉字拼音首字母存储过程

Sqlserver得到汉字拼音首字母存储过程:
create function [dbo].[fun_getPY]
(
@str nvarchar(4000)
)
returns nvarchar(4000)
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@str)>0
begin
   set @word=left(@str,1)
   --如果非汉字字符,返回原字符
& ......

android xml dom解释

private
NodeList root(
final
String url , 
final
String str){
      
NodeList root =
null
;
      
try
{
      
InputSource is=
new
InputSource(
new
InputStreamReader(
new
UR ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号