Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½«±í»ò²éѯ´æ´¢Îª±ê×¼µÄXMLÎļþ

/*--´æΪXML
 ½«±í/²éѯ´æ´¢Îª±ê×¼µÄXMLÎļþ
--*/
/*--µ÷ÓÃʾÀý
 --ÓÃSQLÓÃwinowsÉí·ÝÑéÖ¤µÄÇé¿ö
 exec p_savexml @sql='µØÇø×ÊÁÏ',@fname='c:\µØÇø×ÊÁÏ.xml'
 --ÓÃÖ¸¶¨µÄÓû§
 exec p_savexml @sql='µØÇø×ÊÁÏ',@fname='c:\µØÇø×ÊÁÏ.xml',@userid='sa'
--*/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_savexml]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[p_savexml]
GO
create proc p_savexml
@sql varchar(8000),     --Òª±£´æµÄ±í/ÊÓͼ/SQL²éѯÓï¾ä
@fname varchar(1000)='c:\tmp.xml', --±£´æµÄXMLÎļþÃû
@userid varchar(50)='',    --Óû§Ãû,Èç¹ûΪntÑéÖ¤·½Ê½,ÔòΪ''
@password varchar(50)=''   --ÃÜÂë
as
declare @err int,@src varchar(255),@desc varchar(255)
declare @obj int,@constr varchar(1000)
if isnull(@userid,'')=''
 set @constr='Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog='
  +db_name()+';Data Source='+@@servername
else
 set @constr='Provider=SQLOLEDB.1;Persist Security Info=True;'
  +'User ID='+@userid+';Password='+isnull(@password,'')
  +';Initial Catalog='+db_name()+';Data Source='+@@servername
exec @err=sp_oacreate 'adodb.recordset',@obj out
if @err<>0 goto lberr
exec @err=sp_oamethod @obj,'open',null,@sql,@constr
if @err<>0 goto lberr
set @sql='del '+@fname
exec master..xp_cmdshell @sql,no_output
exec @err=sp_oamethod @obj,'save',null,@fname,1
if @err<>0 goto lberr
exec @err=sp_oadestroy @obj
return
lberr:
 exec sp_oageterrorinfo 0,@src out,@desc out
 select cast(@err as varbinary(4)) as ´íÎóºÅ
  ,@src as ´íÎóÔ´,@desc as ´íÎóÃèÊö
go


Ïà¹ØÎĵµ£º

ʹÓÃXMLHttpRequest´¦ÀíxmlÊý¾Ý£¨¶þ£©


Ê×ÏÈдһ¸öhtmlÒ³Ãæuserxmlajax.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Óû§Ð£ÑéajaxʵÀý</title>
  &nbs ......

libxml¿â½âÎöXMLÎļþ

Ð÷ÂÛ
LibxmlÊÇÒ»¸öÓÐÃâ·ÑÐí¿ÉµÄÓÃÓÚ´¦ÀíXML¡¢¿ÉÒÔÇáËÉ¿çÔ½¶à¸öƽ̨µÄCÓïÑÔ¿â¡£LibxmlʵÏÖÁ˶Á¡¢´´½¨¼°²Ù×ÝXMLÊý¾Ý¹¦ÄÜ¡£
Õâ¸öÖ¸ÄÏ»ùÓÚÒ»¸ö¼òµ¥µÄXMLÓ¦Óá£
Êý¾ÝÀàÐÍ
Libxml ¶¨ÒåÁËÐí¶àÊý¾ÝÀàÐÍ£¬ËüÒþ²ØÁËÔÓÂÒµÄÀ´Ô´ÒÔÖÂÄã²»±Ø´¦ÀíËü³ý·ÇÄãÓÐÌض¨µÄÐèÒª¡£xmlChar Ìæ´úchar,ʹÓÃUTF-8±àÂëµÄÒ»×Ö½Ú×Ö·û´®¡£Èç¹ûÄãµÄÊ ......

Android£¨Èý£©Êý¾Ý´æ´¢Ö®XML½âÎö¼¼Êõ

½ñÈÕ¼ÌÐøѧϰAndroidÖÐʹÓÃPullµÄXML½âÎö¼¼ÊõʵÏÖ¶ÔXMLÎļþµÄ½âÎöºÍ´´½¨¡£ÓÉÓÚÃ÷ÌìÐÝÏ¢£¬Ê±¼ä±È½Ï³äÔ££¬ËùÒÔÎÒÒ²½«×òÌìδ×ܽáµÄSAX½âÎö¼¼ÊõÔÚ´Ë×ö¸ö×ܽᡣ
Ò»¡¢SAX½âÎö¼¼Êõ
SaxʹÓõÄÊÇʼþÇý¶¯µÄÁ÷ʽ½âÎö¼¼Êõ¡£Ê¼þÇý¶¯µÄÁ÷ʽ½âÎö·½Ê½ÊÇ£¬´ÓÎļþµÄ¿ªÊ¼Ë³Ðò½âÎöµ½ÎĵµµÄ½áÊø£¬²»¿ÉÔÝÍ£»òµ¹ÍË¡£µ±½âÎöµ½ÎĵµµÄ¿ªÊ¼»ò½áÊø¡ ......

XML ÑéÖ¤

ת×Ô£ºhttp://www.w3school.com.cn/xml/xml_dtd.asp
ÓµÓÐÕýÈ·Óï·¨µÄ XML ±»³ÆΪ“ÐÎʽÁ¼ºÃ”µÄ XML¡£
ͨ¹ýij¸ö DTD ½øÐÐÁËÑéÖ¤µÄ XML ÊÇ“ºÏ·¨”µÄ XML¡£
ÐÎʽÁ¼ºÃµÄ XML Îĵµ
Ò»¸ö"ÐÎʽÁ¼ºÃ"µÄ XML ÎĵµÓµÓÐÕýÈ·µÄÓï·¨¡£
Ò»¸ö"ÐÎʽÁ¼ºÃ"µÄ XML Îĵµ»á×ñÊØÇ°¼¸Õ½éÉܹýµÄ XML Óï·¨¹æÔò£º
XML 뀵 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ