xml shema°ïÖúÎĵµ5
XML Schema union ÔªËØ
¶¨ÒåºÍÓ÷¨
union ÔªËض¨Òå¶à¸ö simpleType ¶¨ÒåµÄ¼¯ºÏ¡£
ÔªËØÐÅÏ¢
³öÏÖ´ÎÊý
Ò»´Î
¸¸ÔªËØ
simpleType
ÄÚÈÝ
annotation¡¢simpleType
Óï·¨
<union
id=ID
memberTypes="list of QNames"
any attributes
>
(annotation?,(simpleType*))
</union>
£¨? ·ûºÅÉùÃ÷ÔÚ union ÔªËØÖиÃÔªËؿɳöÏÖÁã´Î»òÒ»´Î¡££©
ÊôÐÔ
ÃèÊö
id
¿ÉÑ¡¡£¹æ¶¨¸ÃÔªËصÄΨһµÄ ID¡£
memberTypes
¿ÉÑ¡¡£¹æ¶¨ÔÚ schema Öж¨ÒåµÄÄÚÖÃÊý¾ÝÀàÐÍ»ò simpleType ÔªËصÄÃû³ÆÁÐ±í¡£
any attributes
¿ÉÑ¡¡£¹æ¶¨´øÓÐ non-schema ÃüÃû¿Õ¼äµÄÈκÎÆäËûÊôÐÔ¡£
ʵÀý
Àý×Ó 1
±¾ÀýÊÇÒ»¸öºÏ²¢ÁËÁ½¸ö¼òµ¥ÀàÐ͵ļòµ¥ÀàÐÍ£º
<xs:element name="jeans_size">
<xs:simpleType>
<xs:union memberTypes="sizebyno sizebystring" />
</xs:simpleType>
</xs:element>
<xs:simpleType name="sizebyno">
<xs:restriction base="xs:positiveInteger">
<xs:maxInclusive value="42"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sizebystring">
<xs:restriction base="xs:string">
<xs:enumeration value="small"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="large"/>
</xs:restriction>
</xs:simpleType>
XML Schema unique ÔªËØ
¶¨ÒåºÍÓ÷¨
unique ÔªËØÖ¸¶¨ÊôÐÔ»òÔªËØÖµ£¨»òÕßÊôÐÔ»òÔªËØÖµµÄ×éºÏ£©ÔÚÖ¸¶¨·¶Î§ÄÚ±ØÐëÊÇΨһµÄ¡£ ¸ÃÖµ±ØÐëΨһ»òΪÁã¡£
unique ÔªËرØÐ밴˳Ðò°üº¬ÏÂÁÐÔªËØ£º
selector ÔªËØ
selector ÔªËØ°üº¬ XPath ±í´ïʽ£¬Ö¸¶¨Ò»¸öÔªËؼ¯£¬ÔÚÆäÖÐÓÉ field ÔªËØÖ¸¶¨µÄÖµ±ØÐëΨһ¡£
±ØÐëÓÐÒ»¸öÇÒÖ»ÓÐÒ»¸ö selector ÔªËØ¡£
field ÔªËØ
ÿһ¸ö field ÔªËؾù°üº¬Ò»¸ö XPath ±í´ïʽ£¬Ö¸¶¨
Ïà¹ØÎĵµ£º
XMLÊÇÒ»ÖÖ¿ÉÀ©Õ¹ÖñêÓïÑÔ£¬ÓֳƿÉÀ©Õ¹µÄ±à¼ÓïÑÔ¡£XMLÎĵµµÄ¶¨Òå¸ñʽÓÐÁ½ÖÖ£ºDTDºÍSchema¸ñʽ£¬ÓÉÓÚSchemaÊÇxml±¾ÉíµÄ£¬ËùÒÔÓ¦Óõķdz£Æձ顣xmlµÄ×÷ÓÃÊÇÎļþµÄ¶Áд£¬ËùÒÔÔÚweb¿ª·¢ÖÐÒ²µÃµ½Á˹㷺ӦÓã¬×÷ΪһÖÖÅäÖÃÎļþ£¬³ä·Ö·¢»ÓÁËËü¶ÁдµÄ¹¦ÄÜ¡£XMLµÄ½âÎö·½Ê½ÓÐËÄÖÖ£ºDOM£¬SAX£¬JDOM£¬DOM4J¡£ ......
C#¶ÁÈ¡XML×ÊÁÏ
Ò» C#¶ÁÈ¡XML×ÊÁÏ
À©³ä±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉWÈýC»ú¹ØÖƶ©µÄ¡£×öΪÓÃÒÔ´úÌæHTMLÓïÑÔµÄÒ»ÖÖÐÂʽµÄ±ê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà¸ù±¾»ù×¼£¬XMLÄËÊǾ¹ýÓëÕâЩÏà¸É»ù×¼µØ×éºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåϵÌåÀý×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂʽµÄ³ÌÐòÓïÑÔ£¬ÊÇ.Net¹¹¼ÜµÄÒ»¸öÖ ......
¿ÉÄÜÄúÒѾÌý˵ÁË£¬±¾ÖÜÊÇ Microsoft ÊÂÒµ²¿ºÜ¹Ø¼üµÄÒ»ÖÜ¡£ÔÚ±¾ÖÜÔçЩʱºò£¬ÎÒÃÇÐû²¼½«¹«¿ª·¢ÐÐ Microsoft Office 2010 Beta¡£ÄúÊÇ·ñÔøÏ£ÍûÓëÍŶÓÒ»ÆðÔÚ Word Öй²Í¬´´×÷Ò»·ÝÎĵµ£¿ÄúÊÇ·ñÔøÏ£ÍûÔÚ Excel ÖÐͬʱ·ÖÎö³É¶ÑµÄÊý¾Ý£¿»òÕßÔÚ PowerPoint ÑÝʾÎĸåÖÐÍ»ÆƶàýÌåµÄÏÞÖÆ£¿ÄÇô£¬¸Ï¿ìÊÔÊÔ Beta °æ±¾°É¡£
¶ÔÓÚ±ê×¼ÉçÇø£ ......
/// <summary>
/// ¶ÁÈ¡Êý¾Ý¼¯²¢¼ÓÈ뻺´æ
/// sea 2009-12-11
/// </summary>
&nb ......
C#
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this ......