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

Êý¾ÝÒÔxml¸ñʽ·µ»Ø - MS-SQL Server / Ó¦ÓÃʵÀý

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ

XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked" isBranch="true" label="¼¼Êõ¿Æ" >
<folder state="unchecked" isBranch="false" label="ÕÅÈý" />
<folder state="unchecked" isBranch="false" label="ÀîËÄ" />
<folder state="unchecked" isBranch="false" label="ÍõÎå" />
<folder state="unchecked" isBranch="false" label="ÕÔÁù" />
......
¡¡¡¡ </folder>
¡¡¡¡ <folder state="unchecked" isBranch="true" label="Éú²ú¿Æ" >
<folder state="unchecked" isBranch="false" label="Å£Æß" />
<folder state="unchecked" isBranch="false" label="Âí°Ë" />
......
¡¡¡¡ </folder>
......
</folder>


ѧϰ Õâ¸ö¡·¡£

ÓÐÇëPÁº

select * from t_record FOR XML AUTO


µÈµ½´ð°¸

ding

if object_id('tb') is not null
drop table tb
go
create table tb(id int,name varchar(20))
insert into tb(id,name)
select 1,'zy' u


Ïà¹ØÎÊ´ð£º

jspÁ´½Ósql2000µÄÒÉÎÊ£¿



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

ÈçºÎÌá½»xmlÀàÐÍÊý¾Ý - .NET¼¼Êõ / ASP.NET

Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......

ÇóSQLÓï¾ä£¡£¡£¡ - MS-SQL Server / Ó¦ÓÃʵÀý

clientserial devseral chunnelnum devdata5
CZ0001 308001 5000 11.1
CZ0001 308001 5001 11.2
CZ0001 308001 5002 11.3
CZ0001 3080 ......

sql´æ´¢¹ý³Ìʱ¼äÏà¼õ - MS-SQL Server / »ù´¡Àà

CREATE PROCEDURE [selectvipcompany] 
@username varchar(50),
@companyname varchar(50),
@endtime varchar(1)
AS
declare @sql varchar(1000)
set @sql=''
if (@username<>null and @username ......

sql ËÑË÷Óï¾ä - .NET¼¼Êõ / ASP.NET

<table style="width: 1000px"><tr>
  <td style="height: 38px; width: 35px;">
  ÐÕÃû</td>
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ