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

XML Schema£¨Ó¦ÓÃÉè¼Æ£©

     XML SchemaÖ÷ÒªÓÃÀ´Éè¼ÆXMLÎĵµµÄ½á¹¹£¬×¢Òâ²»ÊǸñʽ¡£ÓÐÈËÎÊÔõô²»ÊǸñʽ£¿¸ñʽ¸ú½á¹¹Ê²Ã´Çø±ð£¿ÎÒÏë¸ã¿ª·¢µÄÈ˶¼¶Ô´úÂë½øÐиñʽ»¯¹ý£¬Ò²¾ÍÊÇËõ½ø¡¢×ÖÌåµÈµÈ£»¶øÎÒÃÇдµÄ³ÌÐòʵ¼ÊÉÏÒ²ÊǶ¨ÒåÒ»Öֽṹ£¬Ëü²»»áÒòΪÄãÊÇ·ñËõ½ø¡¢²ÉÓò»Í¬µÄ×ÖÌå¾ÍÓÐËù¸Ä±ä°É£¿ºÜ¶àÈËÄÄÁ˲»·ÖÐеÄxmlÎĵµËµÓÃVSµÄ¹¤¾ß¸ñʽ»¯Ò»Ï£¬È·ÓÖ·Ö²»Çåxml¸ñʽ¸ú½á¹¹ÓÐʲôÇø±ð£¬ÈÃÎÒÄÑÒÔÀí½â¡£ºÃÁË£¬·Ï»°ÉÙ˵£¬½ÓÏÂÀ´ËµÃ÷ÏÂÈçºÎʹÓÃSchema×é¼þ¶¨ÒåxmlÎĵµµÄ½á¹¹¡£
 
Ò»¡¢SchemaÎĵµµÄ½á¹¹
<?xml version="1.0" encode="utf-8"?> -----xml ÉùÃ÷
<xs:schema targetNamespace="myschema"   xmlns="myschema"            xmlns:xs=http://www.w3.org/2001/XMLSchema>
     <xs:simpleType name="ST1">
          <xs:restriction base="xs:int">
              <xs:minExclusive value="10"/>
          </xs:restriction>
     </xs:simpleType>
    
     <xs:element name="E1" type="ST1"/>
      
      <xs:element name="E2" type="ST1"/>
     <xs:element name="E3" type="CT1"/>
</xs:schema>
ÔÚÉÏÃæµÄÀý×ÓÖУ¬¶¨ÒåÁËÒ»¸ö¼òµ¥ÀàÐÍ£¬Ëüͨ¹ý¶ÔintÀàÐͽøÐÐÔ¼Êø¶øÅÉÉú£¬ÅÉÉúÖ®ºóµÄST1Ϊ´óÓÚ10µÄÕûÊý£»Ëæºó£¬ÉùÃ÷ÁËÒ»¸öÔªËØE1£¬ÔªËصÄÎı¾ÄÚÈÝÖ¸¶¨ÎªST1¡£
ÔÚSchemaÖУ¬¶ÔÀàÐ͵Ĵ´½¨³ÆΪ ¶¨Òå £¬¶ÔÔªËصĴ´½¨³ÆΪ ÉùÃ÷¡£ÔÚʹÓøÃschema´´½¨µÄxmlÎĵµÖУ¬¿ÉÄÜ»á³öÏÖ<E1>20</E1>Õâ¸öÔªËØ£¬ÔÚÆäËüʹÓøÃschemaÖеÄxmlÎĵµÖУ¬¿ÉÄܳöÏÖ <E1>30</E1>,ËüÃǶ¼ÊÇschemaÖж¨ÒåµÄÔªËØE1µÄʵÀý£¬ÕâÀàËÆÓÚC±à³ÌÖÐÉùÃ÷Ò»¸ö½á¹¹£¬ÒÔºó¿ÉÒÔʹÓÃÕâ¸ö½á¹¹´´½¨²»Í¬µÄʵÀý¡£
³ýÁ˼òµ¥ÀàÐ͵Ķ¨ÒåÍ⣬Schema»¹Ö§³Ö¸´ºÏÀàÐ͵Ķ¨Ò壬ÈçÀý×ÓÖеÄCT1¡£ËæºóÒ²ÉùÃ÷ÁËÒ»¸ö¸´ºÏÀàÐ͵ÄÔªËØE3£¬E3ÓÐ×ÓÔªËØE1ºÍE2£¬¶øÇÒ±ØÐëÖÁÉÙÓÐÁ½¸öE1µÄʵÀý£


Ïà¹ØÎĵµ£º

[¼¼Êõѧϰ]C++ XML¿â£¨×ªÔØ£©

ÔÚC++ÖУ¬¿âµÄµØλÊǷdz£¸ßµÄ¡£C++Ö®¸¸ Bjarne StroustrupÏÈÉú¶à´Î±íʾÁËÉè¼Æ¿âÀ´À©³ä¹¦ÄÜÒªºÃ¹ýÉè¼Æ¸ü¶àµÄÓï·¨µÄÑÔÂÛ¡£ÏÖʵÖУ¬C++µÄ¿âÃÅÀà·±¶à£¬½â¾öµÄÎÊÌâÒ²ÊǼ«Æä¹ã·º£¬¿â´ÓÇáÁ¿¼¶µ½ÖØÁ¿¼¶µÄ¶¼ÓС£²»ÉÙ¶¼ÊÇÈÃÈËÑÛ½ç´ó¿ª£¬Òà»òÊÇÍû¶øÉú̾µÄ˼ά½Ü×÷¡£ÓÉÓÚ¿âµÄÊýÁ¿·Ç³£ÅӴ󣬶øÇÒÏÞÓÚ±ÊÕßˮƽ£¬ÆäÖкܶಢ²»Á˽⡣ËùÒÔÎÄÖ ......

XMLÊý¾Ýµº¼¼ÊõµÄ×ܽá

  ×î½ü×öµÄÒ»¸öÏîÄ¿ÖÐÔËÓà xml Êý¾Ýµº¼¼Êõ£¬ËùÒÔ°ÑÊý¾Ýµº·½ÃæµÄ֪ʶ×ܽáһϡ£
  XML Êý¾Ýµº £¨ data islands £©¾ÍÊDZ» html Ò³ÃæÒýÓûòÕß°üº¬µÄ xml Êý¾Ý£¬ÊÇ´Ó IE5 ¿ªÊ¼ÒýÈëµÄÒ»Ïî¼¼Êõ¡£¿ÉÒÔͨ¹ý xml ±êÇ©ºÜÇáËɽ«Êý¾Ýµº²åÈëµ½ html ÎĵµÖС£ÄÇôÔõô·ÃÎÊ xml Êý¾ÝµºµÄÊý¾ÝÄØ£¬ºÜ¼òµ¥£¬Í¨¹ý xml µÄ id ¡£ÔÚÒ³ ......

.netÖУ¬¶ÁÈ¡XMLÔÚÒ³ÃæÏÔʾ£¬²¼¾ÖÓÃRepeater¿Ø¼þ

 public static IList<News> GetAllNews()
        {
            XmlDocument xdoc = new XmlDocument();
            xdoc.Load("Äã¶ÁÈ¡µÄµØÖ·£ºÀýÈç ......

C#¶ÔxmlµÄ²Ù×÷ʵÀýÔ´Âë

À©Õ¹±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉW3C×éÖ¯Öƶ¨µÄ¡£×öΪÓÃÓÚÌæ´úHTMLÓïÑÔµÄÒ»ÖÖÐÂÐ͵ıê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà»ù±¾±ê×¼£¬XML¾ÍÊÇͨ¹ýÓëÕâЩÏà¹Ø±ê×¼µØ½áºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåÖÆ×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂÐ͵ijÌÐòÓïÑÔ£¬ÊÇ.Net¿ò¼ÜµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬ËûºÍXMLµÄ¹ØϵÆÄÉî¡£±¾ÎÄ¾Í´Ó ......

js ½âÎö xml ÊôÐÔ

function init() {
 var viewChartID = 0;
 var viewChartSum = "" ;
 reportName = document.getElementById("reportName").value;
 xmlDoc=loadXMLDoc("./charreport/xml/viewChart.xml");
 x=xmlDoc.getElementsByTagName('viewChart')[0].childNodes;
 for (i=0;i<x.length;i++ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ