首页 > 开发 > XML > 正文

C#对XML操作:建立XML(3)

2024-09-05 20:55:45
字体:
来源:转载
供稿:网友
<?xml version="1.0" standalone="yes"?>
<users>
  <xs:schema id="users" xmlns="" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="users" msdata:isdataset="true" msdata:locale="zh-cn">
      <xs:complextype>
        <xs:choice maxoccurs="unbounded">
          <xs:element name="user">
            <xs:complextype>
              <xs:sequence>
                <xs:element name="username" type="xs:string" minoccurs="0" msdata:ordinal="0" />
                <xs:element name="userpass" type="xs:string" minoccurs="0" msdata:ordinal="1" />
              </xs:sequence>
              <xs:attribute name="id" type="xs:string" />
            </xs:complextype>
          </xs:element>
        </xs:choice>
      </xs:complextype>
    </xs:element>
  </xs:schema>
  <user id="1">
    <username>outrace</username>
    <userpass>mypass</userpass>
  </user>
  <user id="2">
    <username>trace</username>
    <userpass>mypass2</userpass>
  </user>
</users>
 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表