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

XML Schema°ïÖúÎĵµ3

XML Schema attributeGroup ÔªËØ
¶¨ÒåºÍÓ÷¨
attributeGroup ÔªËØÓÃÓÚ¶ÔÊôÐÔÉùÃ÷½øÐÐ×éºÏ£¬ÕâÑùÕâЩÉùÃ÷¾ÍÄܹ»ÒÔ×éºÏµÄÐÎʽºÏ²¢µ½¸´ÔÓÀàÐÍÖС£
ÔªËØÐÅÏ¢
³öÏÖ´ÎÊý
ÎÞÏÞÖÆ
¸¸ÔªËØ
attributeGroup¡¢complexType¡¢schema¡¢restriction (simpleContent)¡¢extension (simpleContent)¡¢restriction (complexContent)¡¢extension (complexContent)
ÄÚÈÝ
annotation¡¢attribute¡¢attributeGroup¡¢anyAttribute
Óï·¨
<attributeGroup
id=ID
name=NCName
ref=QName
any attributes
>
(annotation?),((attribute|attributeGroup)*,anyAttribute?))
</attributeGroup>
£¨? ·ûºÅÉùÃ÷ÔÚ attributeGroup ÔªËØÖУ¬ÔªËؿɳöÏÖÁã´Î»òÒ»´Î£¬* ·ûºÅÉùÃ÷ÔªËؿɳöÏÖÁã´Î»ò¶à´Î¡££©
ÊôÐÔ
ÃèÊö
id
¿ÉÑ¡¡£¹æ¶¨¸ÃÔªËصÄΨһµÄ ID¡£
name
¿ÉÑ¡¡£¹æ¶¨ÊôÐÔ×éµÄÃû³Æ¡£name ºÍ ref ÊôÐÔ²»ÄÜͬʱ³öÏÖ¡£
ref
¿ÉÑ¡¡£¹æ¶¨¶ÔÖ¸¶¨µÄÊôÐÔ×éµÄÒýÓá£name ºÍ ref ÊôÐÔ²»ÄÜͬʱ³öÏÖ¡£
any attributes
¿ÉÑ¡¡£¹æ¶¨´øÓРnon-schema ÃüÃû¿Õ¼äµÄÈκÎÆäËûÊôÐÔ¡£
ʵÀý
<xs:attributeGroup name="personattr">
  <xs:attribute name="attr1" type="string"/>
  <xs:attribute name="attr2" type="integer"/>
</xs:attributeGroup>
<xs:complexType name="person">
  <xs:attributeGroup ref="personattr"/>
</xs:complexType>
ÉÏÃæµÄÀý×Ó¶¨ÒåÁËÒ»¸öÃûΪ "personattr" µÄÊôÐÔ×飬ÔÚÃûΪ "person" µÄ¸´ÔÓÀàÐÍÖÐʹÓá£
XML Schema choice ÔªËØ
¶¨ÒåºÍÓ÷¨
XML Schema µÄ choice ÔªËؽöÔÊÐí°üº¬ÔÚ <choice> ÉùÃ÷ÖеÄÔªËØÖ®Ò»³öÏÖÔÚ°üº¬ÔªËØÖС£
ÔªËØÐÅÏ¢
³öÏÖ´ÎÊý
ÔÚ group ºÍ complexType ÔªËØÖÐΪһ´Î£»ÆäËûΪÎÞÏÞÖÆ¡£
¸¸ÔªËØ
group¡¢choice¡¢sequence¡¢complexType¡¢restriction (simpleContent)¡¢extension (simpleContent)¡¢restriction (complexContent)¡¢extension (complexContent)
ÄÚÈÝ
annotation¡¢any¡¢choice¡¢element¡¢group¡¢sequence
Óï·¨
<choice
id=ID
maxOccu


Ïà¹ØÎĵµ£º

XML×Ö·û´®ºÍXML DOCUMENTµÄÏ໥ת»»¡¾×ª¡¿

ÔÚ×öÒ»°ãµÄXMLÊý¾Ý½»»»¹ý³ÌÖУ¬ÎÒ¸üÀÖÒâ´«µÝXML×Ö·û´®£¬¶ø²»ÊǸñʽ»¯µÄXML Document¡£Õâ¾ÍÉæ¼°µ½XML×Ö·û´®ºÍXml DocumentµÄת»»ÎÊÌ⣬˵°×ÁËÕâÊǸöºÜ¼òµ¥µÄÎÊÌ⣬±¾Îľ͸÷ÖÖXML½âÎöÆ÷·Ö±ðÁоÙÈçÏ£¬ÒÔ·½±ã×Ô¼º½ñºó²éÔÄ¡£
Ò»¡¢Ê¹ÓÃ×îԭʼµÄjavax.xml.parsers£¬±ê×¼µÄjdk api
// ×Ö·û´®×ªXML
String xmlStr = "......";
S ......

ÊÖ°ÑÊÖ½ÌÄãC#¶ÁÈ¡XMLÎļþ

C#¶ÁÈ¡XML×ÊÁÏ
Ò» C#¶ÁÈ¡XML×ÊÁÏ
À©³ä±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉWÈýC»ú¹ØÖƶ©µÄ¡£×öΪÓÃÒÔ´úÌæHTMLÓïÑÔµÄÒ»ÖÖÐÂʽµÄ±ê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà¸ù±¾»ù×¼£¬XMLÄËÊǾ­¹ýÓëÕâЩÏà¸É»ù×¼µØ×éºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåϵÌåÀý×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂʽµÄ³ÌÐòÓïÑÔ£¬ÊÇ.Net¹¹¼ÜµÄÒ»¸öÖ ......

java ¶ÔxmlµÄÔöɾ¸Ä²é

<?xml version="1.0" encoding="UTF-8"?>
<root>
 <person id="1">
  <username >xiaoma</username>
  <password>xiaoma</password>
 </person>
 <person id="2">
  <username>manager</username> ......

xml²Ù×÷

     protected void Button1_Click(object sender, EventArgs e)
        {
            //Ϊresponse(star)½Úµã ºÍ  Cabins(f) cabin½Úµã·Ö±ðÌí¼Ó¸ö
      &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ