[xsd-users] schema with optional element in xml

Boris Kolpackov boris at codesynthesis.com
Fri Oct 6 03:25:12 EDT 2006


Hi Bao,

Bao Young <bao.young at gmail.com> writes:

> I am trying to set up a schema with optional elements in my xml file.
> Example of my xml file:
>
>  ...
>
> 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?

For an introduction to XML Schema I suggest that you read some tutorials
online, for example XML Schema Part 0: Primer[1], and/or buy a book on
XML Schema. This mailing list is not really for teaching XML Schema
basics.

If you would like to use the XML Schema to C++ compiler to access the
data stored in XML from your application, I suggest that you start
with the C++/Tree Mapping Quick Guide[2].


[1] http://www.w3.org/TR/xmlschema-0/
[2] http://codesynthesis.com/projects/xsd/documentation/cxx/tree/quick-guide/


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061006/e46787b6/attachment.pgp


More information about the xsd-users mailing list