[xsd-users] Re: Accessing elements in sequence of choices.
Elements are complex types
Erik Sjölund
erik.sjolund at gmail.com
Sat Mar 17 07:21:11 EDT 2012
On Thu, Mar 15, 2012 at 7:21 PM, B Hart <bhartsb at gmail.com> wrote:
> Hi Erik,
>
> There is a function just as you mention, but could you explain the "object"
> part? Is object a root element in the DOM, or something else?
>
"object" was not from DOM, instead "object" was the variable name of
an object of the generated class corresponding to the xsd element
"E19_01_0".
Maybe this works?
for (E19::E19_01_0_iterator itemp ((*iC)->E19().E19_01_0().begin());
itemp != ((*iC)->E19().E19_01_0().end()); ++itemp)
{
if (itemp->P89_701().present()) {
P89_701 &var = itemp->P89_701().get();
}
}
Another tip:
The library example
examples/cxx/tree/library/driver.cxx
is an example of how to access an object model.
cheers
Erik Sjölund
More information about the xsd-users
mailing list