[xsd-users] Need help !!!

Picsou en Bretagne breizh_picsou at yahoo.fr
Mon Jun 25 08:29:12 EDT 2007


sorry for the reply and thanks for your solution but is it possible to have the parent object to have attributes for exemple because I'm not sur but this solution bring the name of the element only , No ?
  I think it's my last question !!!
   
   
  Mike
  

Boris Kolpackov <boris at codesynthesis.com> a écrit :
  Hi,

In the future please keep your replies CC'ed to the xsd-users mailing
list. This way a) other developers who may have experienced a similar
problem can provide you with a solution b) questions and answers will
be archived and available to others with similar problems.

Picsou en Bretagne 
writes:

> For example, in the sample for polymorphism:
> 
> Bruce Wayne
> 
>
>
> I have in parameter "Bruce Wayne" and I want to know that it a
> "child" of superman with the attributes "can-fly" .... This sample
> is pershaps too short to explain my problem but you can imagine this
> with 2 steps with containers for example.
>
>
> for (AAA::iterator iter ...)
> {
> ... (get and container)
> for (BBB::iterator iter2 ...)
> ---> Here I want to know witch AAA element has the present
> son and his attributes, values without storing this.

You can use the _container function which returns parent object as a
pointer to xml_schema::type. This type is a root of the generated types
hierarchy:

object& obj = ...
xml_schema::type* parent (obj._container ());


hth,
-boris


             
---------------------------------
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


More information about the xsd-users mailing list