Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XML Newbie Question - Converting Nested C++ Structure to XML

From: "James Pannozzi" <jpannozzi@---.--->
To: NULL
Date: 9/1/2004 8:52:00 AM
I have a C++ program which saves information
as a binary file Master Record built from nested structures something like
the following.

struct CLAIMANT
{
char lastname [21];
char firstname [21];
... etc.

}

typedef struct
{
double spent;
double cost;
double yield;
char CaseName[35];
char Client[35];
char fieldx
struct CLAIMANT cl[5]; // 5 claimants
}Master_Record

I'd like to convert this binary format to XML so that I can later
feed the XML records to a historical database .

Never having built an XML file, does it support nesting like this
and if so, are there any potential problems with this approach?

With the binary approach listed above, if there is only 1 claimant, then
there is a lot of empty
space in the saved Master_Record output file.
With the XML approach, I would expect to be able to create a specifier field
so that
it would know how many claimants it has.

So I guess how XML handles nested information is unclear to me.

Thanks
Jim




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent