本站不再更新,欢迎光临 java开发技术网
随笔-230  评论-230  文章-8  trackbacks-0
XSD的学习,下面链接上有详细的XSD学习资料,http://www.w3pop.com/learn/view/p/1/o/0/doc/schema_facets/

www.w3pop.com这网站上有与XML/HTML相关的详细资料。


在Myeclipse编写XSD文件非常的主法,只需要把与XSD相关的元素记住就行,像编辑XML一样,并且有提示,还可以根据XSD文件建立XML文件。这是一个随便写的XSD文件
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/note" xmlns:tns="http://www.example.org/note">
    
<element name="note">
        
<complexType>
            
<attribute name="id" type="integer" use="required" />
            
<sequence>
                
<element  name="to" >
                    
<simpleType>
                        
<restriction base="integer">
                            
<minInclusive value="0"></minInclusive>
                            
<maxInclusive value="100"></maxInclusive>
                        
</restriction>
                    
</simpleType>
                
</element>
                
<element  name="from" type="string"/>
                
<element  name="heading" type="string"/>
                
<element  name="body" type="string"/>
                
            
</sequence>
        
</complexType>
        
    
</element>
    
</schema>
posted on 2007-10-11 22:45 有猫相伴的日子 阅读(644) 评论(0)  编辑  收藏 所属分类: XML/json相关技术

只有注册用户登录后才能发表评论。


网站导航:
 
本站不再更新,欢迎光临 java开发技术网