Nate - 2009-05-01

I started to learn TinyXML two days ago and am able to read the types of files I plan to use to initialize my applications including iterating though repeated elements.  So I'm happy with the learning curve! For once!

It appears that I'm gong to need to construct a LUT to color images that will have 10000 distinct colors, that means I will need to create an XML file with 30,000 or 40,000 elements.

I don't understand how to put the creation of the elements in a loop efficiently.
My XML file will be something like this:

...
<LUT>
  <Entry i=0>
    <R>0</R>
    <G>0</G>
    <B>0</B>
  </Entry>
  <Entry i=1>
    <R>0</R>
    <G>0</G>
    <B>0</B>
  </Entry>

-repeats a lot

</LUT>

The example in the tutorial uses new to craeate a new variable for each element, attribute, and text.  That's a lot, I'd have to keep them in arrays, lists, or some other container and be very careful about using them.

Is there another way to 'reuse' the elements and text object pointers?

Thanks