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

±éÀúÒ»¸öxml²¢Êä³öÖ¸¶¨½ÚµãµÄÖµ - .NET¼¼Êõ / C#

ÎÒÓÐÒ»¸öÀàËƵÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ

xml Ϊ£º

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <RequestType>DISCOVER_XML_METADATA</RequestType>
  <Restrictions>
  <RestrictionList>
  <ObjectExpansion>ObjectProperties</ObjectExpansion>
  </RestrictionList>
  </Restrictions>
  <Properties>
  <PropertyList>
  </PropertyList>
  </Properties>
</Discover>


ÎÒÏÖÔÚͨ¹ý±éÀú£¬ÏÈÅжÏÊÇ·ñÓÐ ObjectExpansion ½Úµã£¬Èç¹ûÓÐÊä³öÆäÖµ¡£

ÇëÖ¸½Ì¡£
C# code:
// XML ¶ÁÈ¡XMLÎļþÖеÄÔªËغÍÔªËØÊôÐÔ
private static void PrintElement(XmlDocument document)
{
XmlNodeList nodeList = document.GetElementsByTagName("*"); //»ñÈ¡ËùÓеÄNode
for (int i = 0; i < nodeList.Count; i++)
{
XmlNode node = nodeList.Item(i);
MessageBox.Show(node.Name); //´òӡÿһ¸önodeµÄÃû³Æ
}
}

private static void PrintAttributes(XmlDocument document)
{
XmlNodeList nodeList = document.GetElementsByTagName("*");
XmlNamedNodeMap nameNodeMap;
XmlElement element;
XmlAttribute attribute;
string at


Ïà¹ØÎÊ´ð£º

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

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

ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐÐ±È½Ï - VC/MFC / HTML/XML

ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐбȽÏ
ÀýÈ磺
<?xml version='1.0' encoding='utf-8'?>
  <TestLIST>
  <PID>40</PID>
  <TestName>ÉîÛÚÊÐ</TestName> ......

C#ºÍÊý¾Ý¿âSQL - MS-SQL Server / »ù´¡Àà

ÎÒÃÇC#×öÒ»¸ö´°Ìå ÍùÊý¾Ý¿âÀï²åÈëÊý¾Ý
  SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
  ......

¸ù¾Ý½ÚµãÃû³ÆÑ­»·É¾³ýxml½Úµã.txt - .NET¼¼Êõ / C#

ÄÚÈÝÈçÌâ¡£¡£ÔÚC#Àï¸ÄÈçºÎдÄØ£¿
±¾À´Ë¼Â·ÊÇÏȱȶԽڵãÃû³Æ£¬ÈçÊǵĻ°¾Í±£´æҪɾ³ý½ÚµãµÄϱê·ÅÔÚÊý×éÀȻºóÑ­»·É¾³ý£¬µ«·¢ÏÖ¡£¡£µ±ÎÒɾ³ýµÚÒ»¸öºó£¬ËùÓнڵãϱêÊýÁ¿¶¼·¢Éú¸Ä±ä¡£¡£
¾Í²»ÄÜÔÙ°´ÕÕ֮ǰ¼Í¼µÄ½Úµã ......

winform±à³ÌÓëASP.NETÓÐÁ¬ÏµÂð - .NET¼¼Êõ / C#

ÆäʵÕâ¸öÎÊÌâ¿ÉÒÔÕÒÀÏʦ»Ø´ð£¬Õâ²»·Å¼ÙÁËÂð£¬ÎÊÎʸ÷λ¸ßÊÖ¡£
¾ø¶ÔÓÐ £¬ASP¡¢netÀïÓкöàµÄÂß¼­Åжϵȶ¼ÐèÒªwinform»ù´¡

C#ÓïÑÔ 
Ado.net C/S½á¹¹
Asp.net B/S½á¹¹

Á©¶¼ÊÇ΢Èí³öµÄ£¬¶¼ÄÜÓÃC#½øÐпª·¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ