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


相关文档:

Java操作XML文件 dom4j 篇【转】

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

转:java解析xml文件四种方式


1.介绍
1)DOM(JAXP Crimson解析器)
DOM是用与平台和语言无关的方式表示XML文档的官方W3C标准。DOM是以层次结构组织的节点或信息片断的集合。这个层次结构允许开发人员在树中寻找特定信息。分析该结构通常需要加载整个文档和构造层次结构,然后才能做任何工作。由于它是基于信息层次的,因而DOM被认为是基于树 ......

java 对xml的增删改查

<?xml version="1.0" encoding="UTF-8"?>
<root>
 <person id="1">
  <username >xiaoma</username>
  <password>xiaoma</password>
 </person>
 <person id="2">
  <username>manager</username> ......

初学XML(一)

XML定义:由标记及其所标记的内容构成的文本文件。
XML作用:用来描述数据的结构,有效分离数据的结构和表示,可以作为数据交换的标准格式。
XML特点:1、可以自定义标记,标记名称是对所标记的数据内容含义的抽象,而不是数据的显示格式。
            &n ......

xml操作

     protected void Button1_Click(object sender, EventArgs e)
        {
            //为response(star)节点 和  Cabins(f) cabin节点分别添加个
      &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号