[xsd-users] Load entire document
Boris Kolpackov
boris at codesynthesis.com
Mon Oct 30 02:12:09 EST 2006
Hi Patrick,
Patrick Shinpaugh <shpatric at vt.edu> writes:
> Is it possible to directly load an entire xml document using the
> generted cxx-tree? It appears as though I would need something similar
> to:
>
> auto_ptr<text> t (
> text_ (argv[1],
> xml_schema::flags::keep_dom |
> xml_schema::flags::dont_initialize));
>
> but it is using a specific type whereas my xml (X3D) documents contain a
> multitude of different types and there isn't a single base type for
> which all others are derived - in the schema at least.
Normally an XML document will have a distinct root element. Some vocabularies
have a set of possible root elements. I assume that your case is the latter:
you have an X3D document but its root element can be any element from a
set of predefined root elements. This is a fairly common scenario and the
way to handle this is described in the C++/Tree Mapping Wiki FAQ #2.2[1]
[1] http://wiki.codesynthesis.com/Tree/FAQ
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/20061030/57ea4481/attachment.pgp
More information about the xsd-users
mailing list