Re: [xsd-users] Optional Cardinality Issues
jatkins
jatkins at wintelligence.org
Tue Apr 21 09:45:01 EDT 2009
Thank you very much! I just wasnt seeing it in the object model.
> -------Original Message-------
> From: Boris Kolpackov <boris at codesynthesis.com>
> Subject: Re: [xsd-users] Optional Cardinality Issues
> Sent: 21 Apr '09 07:36
>
> Hi,
>
> jatkins <jatkins at wintelligence.org> writes:
>
> > <WLANProfile xmlns="...">
> > <name>linksys</name>
> > <SSIDConfig>
> > <SSID>
> > <hex>6C696E6B737973</hex>
> > <name>linksys</name>
> > </SSID>
> > </SSIDConfig>
> > <connectionType>ESS</connectionType>
> > <MSM>
> > <security>
> > <authEncryption>
> > <authentication>open</authentication>
> > <encryption>none</encryption>
> > <useOneX>false</useOneX>
> > </authEncryption>
> > </security>
> > </MSM>
> > </WLANProfile>
> >
> > [...]
> >
> >
> > WLANProfile wlprofile(L"linksys", L"ESS");
> >
> > The MSM section goes deeper and appears to be optional cardinality. How
> > would I populate this information from scratch?
>
> It is actually even easier than the sequence cardinality. You simply
> need to create the MSM object and then call WLANProfile::MSM() setter
> to set it. In fact the most straightforward way to handle such deep
> object models is to start from the inside and work your way out:
>
> authEncryption ae ("open", "none");
> ae.useOneX (false);
>
> security s;
> s.authEncryption (ae);
>
> MSM msm;
> msm.security (s);
>
> wlprofile.MSM (msm);
>
> Boris
>
More information about the xsd-users
mailing list