C#ÖÐÓÃXmlTextReader¶ÔÏó²Ù×÷XMLÎļþ
sd.xmlÎļþ:
<?xml version="1.0" encoding="gb2312"?>
<!--ÕâÊÇÒ»¸öxmlÎļþ-->
<xml1>
<item name="1">µÚÒ»¸öitem</item>
<item name="2">
<item name="1">Õâ¸ö½áµã(1)</item>
</item>
</xml1>
cs²Ù×÷´úÂë:
protected void Page_Load(object sender, EventArgs e)
{
XmlTextReader reader = null;
try
{
reader = new XmlTextReader(Server.MapPath("sd.xml"));
reader.WhitespaceHandling = WhitespaceHandling.None;
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
if (reader.Name == "item" && reader.HasAttributes)
&n
Ïà¹ØÎĵµ£º
ÎÒÃǶ¼ÖªµÀjava¡¢c#¡¢vbµÈÓïÑÔ¶¼ÓÐsleepÔÝÍ£µÄº¯Êý£¬¶øJavaScript½Å±¾Ã»ÓÐÀàËƵŦÄÜ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄʵÏֵķ½·¨£º
<mce:script type="text/javascript"><!--
function test()
{
var s="javascript--ÔÝÍ£º¯Êý";
setTimeout(
function(){
eval(sleep(test)); //Ö´ÐÐreturnÖ®ºóµÄ´úÂ룬Ҳ¾ÍÊÇ&ldq ......
ÕâÊÇÒ»¸öÓÃc#¿ØÖÆ̨³ÌÐòÏ£¬ ÓÃXmlDocument ½øÐÐXML²Ù×÷µÄµÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅ.net XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºbooks.xml
Xml´úÂ룺
<?xml version="1.0" encoding="UTF-8"?>
<books>
< ......
¿ª·¢Öо³£Óöµ½ÒªºÍ¸÷ÖÖ¸÷ÑùµÄ XML ´ò½»µÀ£¬±à¼ XML Îļþʱ×îÍ·Í´µÄ±ãÊÇÒª¼ÇסÐí¶à XML ÔªËØÃû³Æ¡¢ÊôÐÔÃû³Æ¡£
ÐÒÔ˵ÄÊÇ£¬Vistual Studio µÄ XML ÖÇÄÜÌáʾ¹¦ÄÜ¿ÉÒÔ´ó´óµØ¼õÇáÕâһʹ¿à¡£Ö»Ðèͨ¹ýÌí¼Ó×Ô¶¨ÒåµÄ XSD ÎļþʹµÃÔڱ༠XML Îļþʱ»ñµÃV ......
C#µÄToolTip£¨delphi½ÐHint£©»úÖƷdz£¹Ö£¬²»ÊÇÏñdelphiµÄÔª¼þÒ»Ñù£¬Ã¿¸öTControlÓÐÒ»¸öHintÊôÐÔ£¬C#ÓÐÒ»¸öToolTipÔª¼þ£¬µ±°ÑÕâ¸öÔª¼þ´Ó¹¤¾ßÏäÀµ½formÉϺó£¬Ñ¡ÖÐformÉϵÄÈκÎcontrolÔª¼þ£¬ÔÚÊôÐÔ´°Ì壨Object Inspector£©ÉϾͻá¶à³öÒ»¸öÊôÐÔ“toolTip1ÉϵÄToolTip”£¬Èç¹û¶àÀ¼¸¸ ......