<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # XSD &lt;any&gt; 元素 &gt;&lt;any&gt; 元素使我們有能力通過未被 schema 規定的元素來拓展 XML 文檔! h2><any> 元素 &lt;any&gt; 元素使我們有能力通過未被 schema 規定的元素來拓展 XML 文檔! 下面這個例子是從名為 "family.xsd" 的 XML schema 中引用的片段。它展示了一個針對 "person" 元素的聲明。通過使用 &lt;any&gt; 元素,我們可以通過任何元素(在 &lt;lastname&gt; 之后)擴展 "person" 的內容: ``` <xs:element name="person"> ? <xs:complexType> ??? <xs:sequence> ????? <xs:element name="firstname" type="xs:string"/> ????? <xs:element name="lastname" type="xs:string"/> ????? <xs:any minOccurs="0"/> ??? </xs:sequence> ? </xs:complexType> </xs:element> ``` 現在,我們希望使用 "children" 元素來擴展 "person" 元素。這此種情況下我們就可以這么做,即使以上這個 schema 的作者沒有聲明任何 "children" 元素。 請看這個 schema 文件,名為 "children.xsd": ``` <?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="children"> ? <xs:complexType> ??? <xs:sequence> ????? <xs:element name="childname" type="xs:string" ????? maxOccurs="unbounded"/> ??? </xs:sequence> ? </xs:complexType> </xs:element> </xs:schema> ``` 下面這個 XML 文件(名為 "Myfamily.xml"),使用了來自兩個不同的 schema 中的成分,"family.xsd" 和 "children.xsd": ``` <?xml version="1.0" encoding="ISO-8859-1"?> <persons xmlns="http://www.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.microsoft.com family.xsd http://www.w3schools.com children.xsd"> <person> ? <firstname>Hege</firstname> ? <lastname>Refsnes</lastname> ? <children> ??? <childname>Cecilie</childname> ? </children> </person> <person> ? <firstname>Stale</firstname> ? <lastname>Refsnes</lastname> </person> </persons> ``` 上面這個 XML 文件是有效的,這是由于 schema "family.xsd" 允許我們通過在 "lastname" 元素后的可選元素來擴展 "person" 元素。 &lt;any&gt; 和 &lt;anyAttribute&gt; 均可用于制作可擴展的文檔!它們使文檔有能力包含未在主 XML schema 中聲明過的附加元素。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看