[xsd-users] schema with optional element in xml
    Bao Young 
    bao.young at gmail.com
       
    Thu Oct  5 22:38:41 EDT 2006
    
    
  
Hello,
I am trying to set up a schema with optional elements in my xml file.
Example of my xml file:
  <Data>
      <record>
             <field1>abc</field>
             <field2>123</field>
             <subrecord>
                   <item1> false</item1>
                  <item2> def</item2>
             </subrecord>
      </record>
       <author> Jack </author>
        <datecreate>10052006</datecreate>
  </Data>
The xml file described above may have one or more element missing.
ie: <field1> </field1> and <autthor> </author> are optional elements.
How do I set up the schema and how do I access the field from the
application?
thanks,
Bao
    
    
More information about the xsd-users
mailing list