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

XMLÎļþ½á¹¹ºÍ»ù±¾Óï·¨

4.1.1               XMLÎļþ½á¹¹
Ò»¸öXMLÎļþͨ³£°üº¬ÎļþÍ·ºÍÎļþÌåÁ½´ó²¿·Ö
1.         ÎļþÍ·
XMLÎļþÍ·ÓÉXMLÉùÃ÷ÓëDTDÎļþÀàÐÍÉùÃ÷×é³É¡£ÆäÖÐDTDÎļþÀàÐÍÉùÃ÷ÊÇ¿ÉÒÔȱÉٵģ¬¹ØÓÚDTDÉùÃ÷½«ÔÚºóÐøµÄÄÚÈÝÖнéÉÜ£¬¶øXMLÉùÃ÷ÊDZØÐëÒªÓеģ¬ÒÔʹÎļþ·ûºÏXMLµÄ±ê×¼¹æ¸ñ¡£
ÔÚÇ°ÃæµÄFlowers.xmlÎļþÖеĵÚÒ»ÐдúÂ뼴ΪXMLÉùÃ÷£º
<?xml version="1.0" encoding="gb2312"?>
              ÆäÖУº
“<?”´ú±íÒ»ÌõÖ¸ÁîµÄ¿ªÊ¼£¬“?>”´ú±íÒ»ÌõÖ¸ÁîµÄ½áÊø£»
“xml”´ú±í´ËÎļþÊÇXMLÎļþ£»
“ version="1.0" ”´ú±í´ËÎļþÓõÄÊÇXML1.0±ê×¼£»
“ encoding="gb2312" ” ´ú±í´ËÎļþËùÓõÄ×Ö·û¼¯£¬Ä¬ÈÏֵΪUnicode£¬Èç¹û¸ÃÎļþÖÐÒªÓõ½ÖÐÎÄ£¬¾Í±ØÐ뽫´ËÖµÉ趨Ϊgb2312¡£
 
×¢Ò⣺XMLÉùÃ÷±ØÐë³öÏÖÔÚÎĵµµÄµÚÒ»ÐС£
 
2.         ÎļþÌå
ÎļþÌåÖаüº¬µÄÊÇXMLÎļþµÄÄÚÈÝ£¬XMLÔªËØÊÇXMLÎļþÄÚÈݵĻù±¾µ¥Ôª¡£´ÓÓï·¨½²£¬Ò»¸öÔªËØ°üº¬Ò»¸öÆðʼ±ê¼Ç¡¢Ò»¸ö½áÊø±ê¼ÇÒÔ¼°±ê¼ÇÖ®¼äµÄÊý¾ÝÄÚÈÝ¡£
 
XMLÔªËØÓëHTMLÔªËصĸñʽ»ù±¾Ïàͬ£¬Æä¸ñʽÈçÏ£º
<±ê¼ÇÃû³Æ ÊôÐÔÃû1="ÊôÐÔÖµ1" ÊôÐÔÃû1="ÊôÐÔÖµ1" ……>ÄÚÈÝ</±ê¼ÇÃû³Æ>
 
ËùÓеÄÊý¾ÝÄÚÈݶ¼±ØÐëÔÚij¸ö±ê¼ÇµÄ¿ªÊ¼ºÍ½áÊø±ê¼ÇÄÚ£¬¶øÿ¸ö±ê¼ÇÓÖ±ØÐë°üº¬ÔÚÁíÒ»¸ö±ê¼ÇµÄ¿ªÊ¼Óë½áÊø±ê¼ÇÄÚ£¬ÐγÉǶÌ×ʽµÄ·Ö²¼£¬Ö»ÓÐ×îÍâ²ãµÄ±ê¼Ç²»±Ø±»ÆäËûµÄ±ê¼ÇËù°üº¬¡£×îÍâ²ãµÄÊǸùÔªËØ(Root)£¬ÓÖ³ÆÎļþ(Document)ÔªËØ£¬ËùÓеÄÔªËض¼°üº¬ÔÚ¸ùÔªËØÄÚ¡£
ÔÚÇ°ÃæµÄFlowers.xmlÎļþÖУ¬¸ùÔªËؾÍÊÇ<Flowers>£¬¸ùÔªËرØÐë¶øÇÒÖ»ÄÜÓÐÒ»¸ö£¬ÔÚ¸ÃÎļþÓÐÈý¸ö<Flower>×ÓÔªËØ£¬ÕâÑùµÄÔªËØ¿ÉÒÔÓжà¸ö¡£
4.1.2               XMLµÄ»ù±¾Óï·¨
1.         ×¢ÊÍ
XMLµÄ×¢ÊÍÓëHTMLµÄ×¢ÊÍÏàͬ£¬ÒÔ“<!--”¿ªÊ¼£¬ÒÔ“-->”½áÊø¡£
 
2.         Çø·Ö´óСд
ÔÚHTMLÖÐÊDz»Çø·Ö´óСдµÄ£¬¶øXMLÇø·Ö´óСд


Ïà¹ØÎĵµ£º

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=" ......

½»»»Êý¾Ýѧϰһ£º½«xmlÎı¾¶ÁÈ¡µ½DataSet²¢ÏÔʾ

//xmlÎĵµÄÚÈÝ
<?xml version = "1.0" encoding="gb2312" standalone="yes"?>
<VFPData>
 <company>
  <companyno>100</companyno>
  <companyname>ÉϺ£</companyname>
  <ceoname>³ÂËÄ</ceoname>
  <ceoma ......

XMLѧϰ±Ê¼Ç£¨¶þ£©——XMLÔªËØÓëÊôÐÔ


XML ÔªËØ
ÔªËØÃüÃû
XMLÔªËرØÐë×ñÊØÒÔϵÄÃüÃû¹æÔò£º
Ãû×Ö¿É°üº¬×Öĸ¡¢Êý×ÖÒÔ¼°ÆäËûµÄ×Ö·û
Ãû×Ö²»ÄÜÒÔÊý×Ö»òÕß±êµã·ûºÅ¿ªÊ¼
Ãû×Ö²»ÄÜÒÔ×Ö·û“xml”£¨»òÕßXML¡¢Xml£©¿ªÊ¼
Ãû×Ö²»ÄÜ°üº¬¿Õ¸ñ
µ±Äú“·¢Ã÷´´Ôì”ÔªËØÃû³Æʱ£¬ÇëÁôÒâ²¢×ñÑ­ÏÂÃæµÄ¼òµ¥µÄ¹æÔò£º
Äú¿ÉÒÔʹÓóý±£Áô×ÖÍâµÄÈκÎÃû³Æ£ ......

xml °²×°bug

[Bug 230608] missing config.h in latest -14
Ralf Corsepius rc040203 at freenet.de
Tue Mar 6 13:31:13 UTC 2007
Previous message: [Bug 230608] missing config.h in latest -14
Next message: [Bug 230608] missing config.h in latest -14
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] ......

Jdom½¨Á¢XMLÎļþ


   JDOM ÊÇÒ»¸ö¿ªÔ´µÄ´¿java API,ÓÃÓÚ¿ìËÙ¿ª·¢ XML Ó¦ÓóÌÐò,JDOM½«XMLÎĵµ±íʾΪÊ÷£¬°üÀ¨ÔªËØ¡¢ÊôÐÔ¡¢ËµÃ÷¡¢´¦ÀíÖ¸Áî¡¢Îı¾½Úµã¡¢CDATA¶Î£¬µÈµÈ¡£JDOM¿ÉÒÔËæʱ·ÃÎÊÊ÷ÖеÄÈÎÒⲿ·Ö¡£Ê÷ÖÐËùÓв»Í¬½Úµã¾ùΪ¾ßÌåµÄÀà¡£ÔÚhttp://jdom.org¿ÉÒÔÏÂÔØJDOMµÄ×îа汾(ÎÒÕâÀïÊÇ1.0)¡£ÏÂÔغó½âѹ£¬JDOMµÄjarÎļþ¾ÍÊÇbuildÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ