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

XMLÐòÁл¯µÄÎÊÌâ

C# code:

public class CfgData
{
public CfgData()
{
}
public CfgData(ChannelData channelData)
{
m_ChannelData = channelData;
}
private ChannelData m_ChannelData = new ChannelData();
[XmlElement("SerialChannelData", typeof(SerialChannelData))]
public ChannelData Data
{
get { return m_ChannelData; }
set { m_ChannelData = value; }
}
}


ChannelDataÊǸö»ùÀ࣬SerialChannelData¼Ì³ÐÁËËü£¬µ«ÊÇSerialChannelData²»ÔÚChannelData³ÌÐò¼¯ÖУ¬ÒòΪ³ÌÐòÒªÀ©Õ¹ChannelDataÀ࣬ʹ֮Óиü¶àµÄÀàËÆSerialChannelDataµÄ×ÓÀà¡£
ÏÖÔÚµÄÎÊÌâÊÇ£ºÔÚXMLÐòÁл¯Õâ¸öCfgDataʱ£¬±ØÐëÒªÌí¼ÓSerialChannelData³ÌÐò¼¯µÄÒýÓò¢ÇÒ[XmlElement("SerialChannelData", typeof(SerialChannelData))]£¬ÏÔʾµÄÉùÃ÷SerialChannelDataµÄÀàÐÍ£¬²Å¿ÉÒÔÐòÁл¯³É¹¦£¬µ«ÊÇÕâÑùÓÖÎ¥·´ÁËÀ©Õ¹ChannelDataµÄ³õÖÔ¡£Çë½Ì´ó¼ÒÈçºÎ²ÅÄÜÔÚÐòÁл¯CfgDataµÄʱºòÄܹ»¶¯Ì¬µÄµÃµ½ChannelDataµÄ¾ßÌåÀàÐÍ¡£
²¹³ä˵Ã÷£ºCfgData£¬ChannelData£¬SerialChannelData¶¼ÔÚ¶À×ԵijÌÐò¼¯ÖУ¬SerialChannelData¼Ì³ÐChannelData£¬CfgDataÓÐChannelDataÕâ¸öÊôÐÔ¡£ÔÚÖ÷³ÌÐòµ÷ÓÃCfgDataʱҪ¼ÈÄÜÐòÁл¯CfgData£¬ÓÖÄÜ·´ÐòÁл¯CfgData£¬²¢ÇÒÖ÷³ÌÐò²»Äܾ²Ì¬ÒýÓÃChannelDataµÄ×ÓÀà¡£
²»ÖªµÀ´ó¼ÒÓÐûÓÐÀí½âÎÒµÄÒâ˼£¬Çë´ó¼ÒÄܰïÎÒ½â¾öÕâ¸öÉè¼ÆÎÊÌâ¡£

ÆäʵChannelDataÉÏÃæ»¹Óл¹¶àÀ࣬ÐòÁл¯µÄʱºò¶¼Ò»ÆðÐòÁл¯µÄ£¬ÊÇÖ±½Ó×Ô¶


Ïà¹ØÎÊ´ð£º

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

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

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

ÎÒÓÐÒ»¸öÀàËÆµÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ
xml Ϊ£º
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <RequestType>DISCOVER_XML_ME ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎͼ¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

Document½âÎöxmlÓöµ½µÄÎÊÌâ~~ - ÒÆ¶¯Æ½Ì¨ / Android

XMLÎļþÄÚÈÝ£º
- <ResList>
  <page>0</page> 
- <resItem>
  <resName>WWW</resName> 
  </resItem>
- <resItem>
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ