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

Asp.Net XML²Ù×÷»ùÀà

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Xml;
using System.Text;
using MSXML2;
namespace EC
{
/// <summary>
/// XML ²Ù×÷»ùÀà
/// </summary>
public class XmlObject : IDisposable
{



//ÒÔÏÂΪµ¥Ò»¹¦Äܵľ²Ì¬Àà

#region ¶ÁÈ¡XMLµ½DataSet
/**************************************************
* º¯ÊýÃû³Æ:GetXml(string XmlPath)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡XMLµ½DataSet
* ²Î Êý:XmlPath:xmlÎĵµÂ·¾¶
* ʹÓÃʾÁÐ:
* using EC; //ÒýÓÃÃüÃû¿Õ¼ä
* string xmlPath = Server.MapPath("/EBDnsConfig/DnsConfig.xml"); //»ñÈ¡xml·¾¶
* DataSet ds = EC.XmlObject.GetXml(xmlPath); //¶ÁÈ¡xmlµ½DataSetÖÐ
************************************************/
/// <summary>
/// ¹¦ÄÜ:¶ÁÈ¡XMLµ½DataSetÖÐ
/// </summary>
/// <param name="XmlPath">xml·¾¶</param>
/// <returns>DataSet</returns>
public static DataSet GetXml(string XmlPath)
{
DataSet ds = new DataSet();
ds.ReadXml(@XmlPath);
return ds;
}
#endregion
#region ¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã
/**************************************************
* º¯ÊýÃû³Æ:ReadXmlReturnNode(string XmlPath,string Node)
* ¹¦ÄÜ˵Ã÷:¶ÁÈ¡xmlÎĵµ²¢·µ»ØÒ»¸ö½Úµã:ÊÊÓÃÓÚÒ»¼¶½Úµã
* ²Î Êý: XmlPath:xmlÎĵµÂ·¾¶;Node ·µ»ØµÄ½ÚµãÃû³Æ
* ÊÊÓ¦ÓÃXml:<?xml version="1.0" encoding="utf-8" ?>
* <root>
* <dns1>ns1.everdns.com</dns1>
* </root>
* ʹÓÃʾÁÐ:


Ïà¹ØÎĵµ£º

asp.netÓÒ¼üµ¯³öÉÏÏÂÎIJ˵¥

xtreeView.js
---==========================================================
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("Panel2")
function showmenuie5(e)
{
   
&n ......

¡¾×ª¡¿asp.net ¿Í»§¶Ë»Øµ÷֪ͨ


ÔÚ ASP.NET ÍøÒ³µÄĬÈÏÄ£ÐÍÖУ¬Óû§»áÓëÒ³½»»¥£¬µ¥»÷°´Å¥»òÖ´Ðе¼Ö»ط¢µÄһЩÆäËû²Ù×÷¡£´Ëʱ½«ÖØд´½¨Ò³¼°Æä¿Ø¼þ£¬²¢ÔÚ·þÎñÆ÷ÉÏÔËÐÐÒ³´úÂ룬ÇÒа汾µÄÒ³±»³ÊÏÖµ½ä¯ÀÀÆ÷¡£µ«ÊÇ£¬ÔÚÓÐЩÇé¿öÏ£¬ÐèÒª´Ó¿Í»§¶ËÔËÐзþÎñÆ÷´úÂ룬¶ø²»Ö´Ðлط¢¡£Èç¹ûÒ³ÖеĿͻ§¶Ë½Å±¾Î¬»¤Ò»Ð©×´Ì¬ÐÅÏ¢£¨ÀýÈ磬¾Ö²¿±äÁ¿Öµ£©£¬ÄÇô·¢ËÍÒ³ºÍ»ñÈ¡Ò ......

sqlserver FOR XML PATH Óï¾äµÄÓ¦ÓÃ

´úÂëÈçÏÂ:

DECLARE
@TempTable table(UserID int , UserName nvarchar(50));
insert into
@TempTable (UserID,UserName) values (1,'a')
insert into @TempTable
(UserID,UserName) values (2,'b')

select UserID,UserName
from @TempTable FOR XML PATH
ÔËÐÐÕâ¶Î½Å±¾£¬½«Éú³ÉÈçϽá¹û£º
¸´ÖÆ´úÂë ......

C#¶ÁÈ¡º¬ÓÐxmlnsµÄXMLÎļþ

1 ÀàËÆxmlns=""µÄÎļþ
ʾÀýXMLÎļþ:
 <?xml version="1.0" encoding="UTF-8"?>
<WebSrvMessage xmlns="http://www.lenoval.com/">
  <version>1.0</version>
  <DataContent>
    <DateTag>2010-5-17</DateTag>
  </DataCont ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ