技术开发 频道

Microsoft Office InfoPath中用XML标准

    XML 中的命名空间

    InfoPath 支持在一个 XML 文档中使用多个命名空间。例如,下面的 XML 文档是一个名为 Contoso 的虚拟公司的简化销售报表,说明了使用两个命名空间的情况。 和 元素定义在默认的命名空间中,该命名空间映射到 URI http://schemas.contoso.com/salesReport。 和 元素定义在独立的命名空间中,该命名空间使用 pricing 前缀并映射到 URI http://schemas.contoso.com/pricing。
  
    <salesReport xmlns="http://schemas.contoso.com/salesReport"

    xmlns:pricing="http://schemas.contoso.com/pricing">

    <customer>

    <product>Pentosel</product>

    <pricing:unitsSold>100</pricing:unitsSold>

    <pricing:pricePerUnit>35</pricing:pricePerUnit>

    </customer>

    </salesReport>
  
    在另一个示例中,XML 命名空间用于多信息文本字段。多信息文本字段绑定到引用 XHTML 架构命名空间的 XML 数据元素。有关详细信息,请参阅本文的 XHTML 部分。
  
 

0
相关文章