[xsd-users] Need some help
Vinaya Shrestha
vinayashrestha at gmail.com
Fri Mar 20 06:21:04 EDT 2009
Hello, I am trying to generate a C++ class from XML document. My XML
document is more complex, so I'll put my problem by putting op an analogous
statement here.
For instance, here's the XML document.
<club>
<member>
<id/>
<name>
<dob>
</member>
<member>
<id/>
<name>
<dob>
</member>
............
</club>
I created the skeleton class by using xsd command and inherited from the
skeleton class to create concrete class. Here, Club and Member are XML
complexTypes.
So two classes club_pskel and member_pskel have been created. MY concrete
classes are as follows:
class Member_pimpl:public Member_pskel
{
private:
string id;
string name;
string dob;
.................
};
class Club_pimpl:public Club_pskel
{
private:
Member_pimpl Member; // the Member object is a member of
Club class
......
};
I have used these two classes to store the XML information. Things were
fine, when there was a single member node. But as I added up more member
nodes, I could not figure out how to store all the Member nodes. Little help
on that subject would be very nice.
More information about the xsd-users
mailing list