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

.NET SQLServer2005 XML×Ö¶Î

//ÕâÊÇÌí¼Ó 
private void button1_Click(object sender, EventArgs e)
        {
            string s = "Persist Security Info=False;Integrated Security=SSPI;database=IIntegration;server=(local)";
            using (SqlConnection conn = new SqlConnection(s))
            {
                using (SqlCommand cmd1 = new SqlCommand("INSERT testxml VALUES(@ID, @XmlData)", conn))
                {
                    conn.Open();
                    cmd1.Parameters.Add("@ID", SqlDbType.Int, 4);
                    cmd1.Parameters[0].Value = 2;
                    cmd1.Parameters.Add("@XmlData", SqlDbType.Xml);
                    cmd1.Parameters[1].Value = GetXmlData();
                    cmd1.ExecuteNonQuery();
                 
                }
            }
        }
     &nbs


Ïà¹ØÎĵµ£º

½«XMLÊý¾ÝÌî³äµ½TreeViewÖÐ

Îĵµ¼°´úÂëÏÂÔØ£ºhttp://www.dingos.cn/index.php?topic=1899.0
½éÉÜ

µ±²Ëµ¥ÏîÊǾ­³£¸Ä±äʱ£¬´ÓXMLÎĵµÖд´½¨TreeView²Åµ±ÊǷdz£ÓÐÓõġ£ÀýÈ磬ʹÓÃXML×÷ΪÊý¾Ý¿â´æ´¢¼Ç¼¡£
ÕâÀïÓиö¼òµ¥Ê¾Àý¡£ÒÔ·À»ìÏýÕâ¸öÀý×ӱȽϼòµ¥¡£
±³¾°
¶ÔXML¡¢TreeView¿Ø¼þµÄÓ¦Óã¬ÔÚVisual StudioÖÐÓÐÖúÓÚÀí½âÕâЩ²½Öè¡£
ʹÓôúÂë
×¢Òâ ......

C££¶ÁÈ¡XMLÎļþµÄ¼òµ¥·½·¨

Ò»¡¢XMLÖ»ÓÐÒ»¸öTableµÄÇé¿ö
      £¨1£©userInfo.xml
              <?xml version="1.0" encoding="utf-8" ?>
              <UserInfo ......

SqlServer ʵÏÖÈÕÆÚ²»Í¬¸ñʽµÄת»»£¡£¡

select
convert(char(4),auth,120)+'Äê'+
substring(convert(char(10),auth,120),6,2)+'ÔÂ'+
substring(convert(char(10),auth,120),9,2)+'ÈÕ',
convert(char(4),appr,120)+'Äê'+
substring(convert(char(10),appr,120),6,2)+'ÔÂ'+
substring(convert(char(10),appr,120),9,2)+'ÈÕ'
from a

ÒÔÉÏ´úÂëʵÏֵĹ¦Ä ......

¸ßÐÔÄÜXML½âÎöÀà

//pugxml.h
///////////////////////////////////////////////////////////////////////////////
//
// Pug XML Parser - Version 1.0002
// --------------------------------------------------------
// Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
// Released into the Public Domain. Use at yo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ