易截截图软件、单文件、免安装、纯绿色、仅160KB

XML Schema nillable=”true” vs minOccurs=”0″

出处:http://www.dimuthu.org/blog/2008/08/18/xml-schema-nillabletrue-vs-minoccurs0/
【前言】一个月前研究过nillable="true"和 vs minOccurs="0"的区分,没有想到啊,今天就记不得了,看来真是好记性不如烂笔头啊,况且我还么的好记性。。。。
【总结】英文一眼看不出结论,说点汉语直接些,别说我土哈~
nillable="true":该元素的值可以为空,但是该元素不能省略,也就是说,只能:
<minzero xsi:nil="true"><minzero>
而不能直接将minzero这个元素去掉
(注意:xsi:nil="true"或者xsi:nil="1"应该就是表示这个元素为空)
minOccurs="0":该元素可以直接被省略掉,但是不能让该元素的值为空,也就是说,不能:
<minzero xsi:nil="true"><minzero>
In a WSDL, XML Schema is the section where it define the message format for each operations, which eventually become the real API that users are interested. And it is the most tricky part of the WSDL. Nowadays there are many tools that you can design and use WSDLs without any needs in knowing the meaning of a single line of the WSDL. But there are situations that you may find it is better you have some knowledge in XML Schema section and in WSDL overall.
For this post I m taking a simple example of use of nillable=”true” and minOccurs=”0″. Take the following example.
<xs:element name="myelements">
<xs:complexType>
<xs:sequence>
<xs:element name="nonboth" type="xs:string"/>
<xs:element minOccurs="0" name="minzero" type="xs:int"/>
<xs:element name="nilint" nillable="true" type="xs:int"/>
<xs:element name="nilstring" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="minzeronil" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Just ignore the meaning of what nillable and minOccurs attributes for now. You can safely say the following XML is valid for the above Schema.
<myelements>
<nonboth>i can't be either nil nor skipped<nonboth>


相关文档:

XMLHttpRequest 异步处理XML典型应用

声明对象实例
var xmlhttp = false;
//产生一个XMLHttpRequest对象实例
getHTTPRequestObject();
function getHTTPRequestObject()
{
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp = new ActiveXObject("Micr ......

Xml Schema

Standards
"DTD" was the first formalized standard, but is rarely used anymore.
"XDR" was an early attempt by Microsoft to provide a more comprehensive standard than DTD. This standard has pretty much been abandoned now in favor of XSD.
"XSD" is currently the de facto standard for describing XML d ......

xml解析方式

在平时工作中,难免会遇到把XML作为数据存储格式。面对目前种类繁多的解决方案,哪个最适合我们呢?在这篇文章中,我对这四种主流方案做一个不完全评测,仅仅针对遍历XML这块来测试,因为遍历XML是工作中使用最多的(至少我认为)。
  预备
  测试环境:
  AMD毒龙1.4G OC 1.5G、256M DDR333、Windows2000 Server SP ......

C++ XML解析之TinyXML篇

 标签:XML解析 TinyXML   [推送到技术圈]
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://panpan.blog.51cto.com/489034/104961
最近使用TinyXML进行C++ XML解析,感觉使用起来比较简单,很容易上手,本文给出一个使用TinyXML进行XML解 ......

XML的一些简单问题!

(第1章)
(P1~3)1.用自己的语言对SGML、HTML和XML作简单介绍和对比。
SGML  是一种采用标记来描述文档数据的通用语言,SGML定义了基本的语法好,同时也允许用户建立自己的元素标记。
HTML 采用了很小一部分SGML的标记,同时HTML采用的是固定标记也不需要包含DTD。
XML 同HTML一样,都是出自于SGML标准通用标记语 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号