Consider using a vector of structures. Each is dynamically allocated as needed and a vector acts very much like an array in that you can access the individual members with a square bracket index.
On Aug 13, 2004, at 3:22 PM, Jones, Brian O. wrote:
Since What I did was to loop through the tree to get to the value and once I have the value then store the value in the structure, but since the entire section is repeated. I am using a array of structures to store the data.
Maybe a snippet of code might get me to see the solution???
-----Original Message----- From: Dan White [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 3:04 PM To: Jones, Brian O. Cc: [EMAIL PROTECTED] Subject: RE: storing data from XML file into data structure
Is there a reason you cannot populate your structure directly out of the
DOM tree ? I have done that.
Seems like an unnecessary extra step to me. But then I do not know all
the detils.
On Fri, 13 Aug 2004, Jones, Brian O. wrote:
I use DOM, but what I was trying to do was eliminate writing the contents to a file first and then reading the file into my structure.
-----Original Message-----
From: Dan White [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 2:38 PM
To: Jones, Brian O.
Cc: [EMAIL PROTECTED]
Subject: Re: storing data from XML file into data structure
Why not use DOM ?
It parses the XML and then you have the document "tree" to work from.
On Fri, 13 Aug 2004, Jones, Brian O. wrote:
Hi all,
I am trying to store all the contents of my xml file in a structure when I parse the file, but each section of my file is repeat and I don't want to overwrite what I already have.
So my current solution is to parse the file and store the information in a temp file and read the temp file and store the information in my data structure.
I just want to know if there is a better solution than the one I've tried.
Brian Jones
Senior Software Engineer
(Email) [EMAIL PROTECTED]
Phone (410) 993-2072
Fax (410) 981-8381
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]