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

Sqlserver£º´ÓXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢

ÈçºÎÔÚSqlserverÖдÓÍⲿXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÄØ£¿¸ÃÎÊÌâÔ´×ÔÒ»¼ÒÆóÒµµÄ±ÊÊÔÐÅÏ¢ÓиС£
Ò»xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="utf-8"?>
<root>
  <db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
  </db>
  <db name="ClientDB2" datasize="1536MB" datagrowth="200MB" logsize="100MB" loggrowth ="100MB">
  </db>
  <db name="ClientDBN" datasize="1024MB" datagrowth="200MB" logsize="100MB" loggrowth ="80MB">
  </db>
</root>
½Å±¾£º
declare @x xml
declare @hdocid int
/*´ÓÍⲿÎļþ¶ÁÈ¡ÎļþÄÚÈÝ
ÓкܶàÖÖ·½Ê½£º
xp_cmdshell µ÷ÓòÙ×÷ϵͳµÄÏÔʽÎı¾ÎļþÄÚÈݵÄÀ©Õ¹´æ´¢¹ý³Ì¡£
bcp.exe µ¼Èëµ¼³ö¹¤¾ß
openrowset¶ÁÈëÎı¾ÎļþÄÚÈÝ£¨sql2005µÃµ½ÔöÇ¿£©
bulk insertÓï¾ä
*/
select @x=bulkcolumn
from openrowset(bulk 'c:\db_conifig.xml',SINGLE_CLOB ) as t¡¡¡¡--sqlserver2005µÄÔöÇ¿bulkÓï·¨
 
--½âÎö³ÉxmlÊ÷ÐÎÎĵµÔÚÄÚ´æÖÐ
exec sp_xml_preparedocument @hdocid output,@x
 
--sqlserver½âÎö³É½á¹û¼¯µÄÐÎʽ£¬±ãÓÚʹÓ᣻òÕßÖ±½ÓÀûÓÃxmlÀàÐ͵ķ½·¨½âÎö£¡
select *
from openxml(@hdocid,'/root/db') with (name varchar(50),datasize varchar(50),datagrowth varchar(50),logsize varchar(50),loggrowth varchar(50))


Ïà¹ØÎĵµ£º

java½âÎöxmlÎļþ

==========================================
xmlÎļþ
£¼?xml version="1.0" encoding="GB2312"?£¾
£¼RESULT£¾
£¼VALUE£¾
¡¡¡¡ £¼NO£¾A1234£¼/NO£¾
¡¡¡¡ £¼ADDR£¾ËÄ´¨Ê¡XXÏØXXÕòXX·X¶ÎXXºÅ£¼/ADDR£¾
£¼/VALUE£¾
£¼VALUE£¾
¡¡¡¡ £¼NO£¾B1234£¼/NO£¾
¡¡ ¡¡£¼ADDR£¾ËÄ´¨Ê¡XXÊÐXXÏçXX ......

spring xmlÖеÄpropery µÄnameÊôÐÔÃû×ÔÀ´Ô´

½ñÌìÔÚÔËÓÃspringµÄPropertyPlaceholderConfigurerʱ·¢ÏÖÒ»¸öÓÐÒâ˼µÄÄÚÈÝ£¬µ±ÄãÔÚapplicationContextÖÐÅäÖÃÒ»¸öPropertyPlaceholderConfigurerµÄbeanʱ£¬ÓÐlocationºÍlocationsµÄÊôÐÔ£¬²»Ã÷˼Òâlocation¶ÔÓ¦Ò»¸ö.propertiesÎļþ£¬
locations¶ÔÓ¦¶à¸ö.propertiesÎļþ£¬³å×ÅÏë¿´Ò»ÏÂPropertyPlaceholderConfigurerµÄʵÏÖ»úÖ ......

Linq xml Ê÷¼ÓÔØ×ܽá(1)

  ¾­³£»áÓõ½xmlÎļþ£¬ÄÚÈݼÓÔØ£¬ Èç¹ûʹÓÃlinq xmlÊ÷¼ÓÔØ£¬ÐèҪͨ¹ýXElementÀ࣬һÖÖ·½Ê½ÊÇÒÔ×Ö·û´®µÄÐÎʽ¼ÓÔØ£¬ÁíÍâÒ»ÖÖ·½Ê½ÊÇÒÔÎļþÐÎʽ¼ÓÔØ¡£         1.ÒÔ×Ö·û´®ÐÎʽ¼ÓÔØ¡£           ÔÚXElementÀàÖУ¬Í¨¹ý¾²Ì¬µÄParse()·½·¨ ......

XML½âÎö·½·¨½²½â

XMLÏÖÔÚÒѾ­³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ