[xsd-users] Print all information for one xml without knowing all
tag names
Dian Du
dian.aa.du at gmail.com
Tue Jun 9 18:52:43 EDT 2009
Hello:
>From the example at http://www.codesynthesis.com/products/xsd/
<contact>
<name>John Doe</name>
<email>j at doe.com</email>
<phone>555 12345</phone>
</contact>
auto_ptr<Contact> c = contact ("c.xml");
cout << c->name () << ", "
<< c->email () << ", "
<< c->phone () << endl;
We have to know the name of each tag before calling one of the
function named as tag, such as c->name ().
How do I implement a more genetic way, as as
auto_ptr<Contact> c = contact ("c.xml");
while (not end of tags) {
cout << c->one of tay();
next tag
}
Thank you for you reply.
Dian
More information about the xsd-users
mailing list