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

NET ¶Á¡¢Ð´¡¢²é¡¢É¾¡¢¸ÄXMLÎļþ

.NET¶Á¡¢Ð´¡¢²é¡¢É¾¡¢¸ÄXMLÎļþ

Ò»¡¢    
XML
¼ò½é
XML
¼´¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¨
EXtensible Markup Language
£©£¬ÊÇÒ»ÖÖ±ê¼ÇÓïÑÔ£¬ºÜÀàËÆ
HTML
¡£
XML
µÄÉè¼Æ×ÚÖ¼ÊÇ´«ÊäÊý¾Ý£¬¶ø·ÇÏÔʾÊý¾Ý¡£
XML
±êǩûÓб»Ô¤¶¨Ò壬ÐèÒªÓû§¶¨Òå±êÇ©¡£
XML
±»Éè¼ÆÎª¾ßÓÐ×ÔÎÒÃèÊöÐÔ²¢·ûºÏ
W3C
µÄÍÆ¼ö±ê×¼¡£
XML
ÒѾ­±»¹ã·ºµÄÓ¦ÓÃÓÚÈí¼þ¿ª·¢µÄºÜ¶à·½Ãæ£¬ÌØ±ðÊÇ
Web
¿ª·¢¡£³£ÓÃÓÚ¼ò»¯Êý¾ÝµÄ´æ´¢ºÍ¹²Ïí¡£
¶þ¡¢    
XML
Óï·¨
1£© 
¿ÉÒÔ¸ù¾ÝÓ¦ÓñàдÓÐʵ¼ÊÒâÒåµÄ±êÇ©
±ÈÈçÒªÃèÊö°à¼¶¿ÉÒÔ¶¨Òå
<Class>
±êÇ©£¬ÒªÃèÊöѧÉú¿ÉÒÔ¶¨Òå
<Student>
±êÇ©¡£
2£© 
ËùÓÐ
XML
±êÇ©±ØÐë
ÓйرձêÇ©£¬È磺
<Class>
¸ßÈýÒ»°à
</Class>
</Class>
ÊǹرձêÇ©£»ÔÙÈ磺
<Student>
¸ßÈýÒ»°à
</Student>
</Student>
ÊǹرձêÇ©¡£
3£© 
XML
±êǩҲÊÇÇø·Ö´óСдµÄ£º
<Class>
¸ßÈýÒ»°à
</class>
ÉÏÃæÐ´·¨ÊÇ´íÎóµÄ£¬ÒòΪ
<Class>
ºÍ
</class>
ÊDz»Í¬µÄ±êÇ©£¬
</class>
ÊÇ
<class>
µÄ¹Ø±Õ±êÇ©£¬¶ø²»ÊÇ
<Class>
µÄ¹Ø±Õ±êÇ©¡£
3
£©
XML
±êÇ©ÊÇ¿ÉÒÔǶÌ׵쬶øÇÒ±ØÐëÕýȷǶÌ×£¬ËùνǶÌ×Ò²¾ÍÊÇÔÚÆäÄÚµÄÒâ˼£¬°ÑÎÕÕâÒ»µã¾Í²»ÄÑ¿´³öÒ»ÏÂÄĸöÊÇ´íÎóµÄÁË£¬ÕýÈ·µÄд·¨ÈçÏ£º
<Class>
        
<Student>
        
</Student>
</Class>
´íÎóµÄд·¨£º
<Class>
        
<Student>
        
</Class>
</Student>
ÔÚ±àд
XML
´úÂëʱ£¬×¢Òâ±£³ÖÇåÎúµØ²ã´Î½á¹¹¡£
4£© 
XML
±ØÐëÓиùÔªËØ£¬¸ùÔªËØÓÐÇÒÖ»ÄÜÓÐÒ»¸ö
<Root>
        
<Child>1</Child>
<Child>2</Child>
<Child>3</Child>
</Root>
5£© 
¿ÉÒÔ¸ø
XML
±êÇ©¶¨ÒåÊôÐÔ£¬ÊôÐÔÖµ±ØÐë·ÅÔÚÓ¢Îİë½ÇË«ÒýºÅÀïÃæ¡£
<Class Name=”
¸ßÈýÒ»°à
”>
<Student>
</Student>
</Class>
ÏÂÃæÊôÐÔÊÇ´íÎóµÄ£º
<Class Name=
¸ßÈýÒ»°à
&g


Ïà¹ØÎĵµ£º

XML ³£Ó÷½·¨¼¯

ÏÂÃæµÄ±í¸ñÁгöÁ˰üº¬ÔÚDOM Level 1Öеķ½·¨£¬²¢Áгö²»Í¬µÄä¯ÀÀÆ÷ÊÇ·ñÖ§³ÖÏî¡£
·½    ·¨
Ãè    Êö
IE
MOZ
OP
SAF
createAttribute
(name
)
Óøø¶¨Ãû³Æname
´´½¨ÌØÐÔ½Úµã
×
×
×
£­
createCDATASection
(text
)
Óðüº¬Îı¾
text
µÄÎı¾×Ó½Úµã
´´½ ......

ÓÃCMarkUpÀà½âÎöXMLÎļþ

½âÎö£º
 CMarkup xml;
 CString strChanText, strChanType;
 xml.Load("MyXml.xml");
 xml.ResetMainPos();
 if (!Chan.FindElem("TreeOrg"))
 {
      return;
 }
 if (xml.IntoElem())
 {
      xml.FindEle ......

XML Schema nillable=¡±true¡± vs minOccurs=¡±0¡å

³ö´¦£ºhttp://www.dimuthu.org/blog/2008/08/18/xml-schema-nillabletrue-vs-minoccurs0/
¡¾Ç°ÑÔ¡¿Ò»¸öÔÂǰÑо¿¹ýnillable="true"ºÍ vs minOccurs="0"µÄÇø·Ö£¬Ã»ÓÐÏëµ½°¡£¬½ñÌì¾Í¼Ç²»µÃÁË£¬¿´À´ÕæÊǺüÇÐÔ²»ÈçÀñÊÍ·°¡£¬¿öÇÒÎÒ»¹Ã´µÄºÃ¼ÇÐÔ¡£¡£¡£¡£
¡¾×ܽ᡿ӢÎÄÒ»ÑÛ¿´²»³ö½áÂÛ£¬ËµµãººÓïÖ±½ÓЩ£¬±ð˵ÎÒÍÁ¹þ~
nillable=" ......

Use the XML Parser in OS 9.x


Paul.Todd | 09 April, 2007 15:24
I have noticed a couple of people seem to be having problems with using the XML parser in Symbian and there are no examples outside of the devkit. The parser I will be talking about is the xml one, not the one SOAP engine as the SOAP one is Nokia specific.
The ke ......

Example Code of Using XML Parser in Symbian OS

antonypr | 14 April, 2007 00:05
A couple of weeks ago, I had a plan to write an article and example code of using XML parser in Symbian OS. It seems that another Forum Nokia Champion, Paul Todd had the same idea. He posted a nice article about XML parser in Symbian OS 9.x to Forum Nokia Blogs. It's ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ