易截截图软件、单文件、免安装、纯绿色、仅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 ......

Java操作XML文件 dom4j 篇【转】

在项目中,我们很多都用到了xml文件,无论是参数配置还是与其它系统的数据交互。
今天就来讲一下Java 中使用dom4j来操作XML文件。
我们需要引入的包:
//文件包
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileWriter;
//工具包
import java.util.Itera ......

SAXReader的主要用法(XML)


java 代码
package com.dc.framework.taglib;   
import java.io.FileInputStream;   
import java.io.FileNotFoundException;   
import java.util.HashMap;   
import java.util.Iterator;   
import java.util.List; &nb ......

xml转换为dataset

        /// <summary>
        /// 读取数据集并加入缓存
        /// sea 2009-12-11
        /// </summary>
      &nb ......

XML Schema帮助文档2

XML Schema annotation 元素
定义和用法
annotation 元素是一个顶层元素,规定 schema 的注释。
注释:可以包含 appinfo 元素(由应用程序使用的信息)和 documentation 元素(由用户读取或使用的注释或文本)。
元素信息
项目
说明
出现次数
在父元素中一次。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号