Home Tutorial Xml Specifying Element Type Locally

 
 

Specifying Element Type Locally
Posted on: November 20, 2010 at 12:00 AM
Advertisement
You can also define the type of an element locally. The local type is unnamed and that type is available to that element only.
Specifying Element Type Locally

You can also define the type of an element locally. The local type is unnamed and that type is available to that element only.

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:element name="myelm1">
          <xs:complexType>
               <xs:sequence>
                   <xs:element name="myelm2">
                        <
xs:simpleType>
                           <
xs:restriction base="xs:string">
                               <
xs:length value="10"/>
                           <
/xs:restriction>
                        <
/xs:simpleType>
                   <
/xs:element>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
</xs:schema>
Advertisement

Related Tags for Specifying Element Type Locally:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 20, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com