How the xml is organized is there's a portion that lists each node in each subsection and the type of node with an IdRef such as:

<Node IdRef="0x0100000100000075" Type="Dialogue"> <Node IdRef="0x0100000100000096" Type="DialogueFragment"/> <Node IdRef="0x010000010000009B" Type="Connection"/> <Node IdRef="0x0100000300000196" Type="Connection"/> <Node IdRef="0x0100000300000197" Type="DialogueFragment"/> </Node>

Then each node of type Connection lists, which node goes to which DialogueFragment. So, I'm rebuilding the binary trees from the documentation in C++, so I can print out each dialogue in the appropriate order and eventually generate files from it.

The only snag I've hit is building the binary tree correctly. I figured since each node has to go in a particular spot I'd need to breadth first search(Once I get it working I'll play around with other searches) through the binary tree being built and drop the node off at the appropriate place based on the Connection. The problem I'm having is saving the IdRef to vectors for the current route and visited nodes because they're huge long long numbers. Once I have the data structure down correctly, for the tree I'll rewrite it keeping those long longs as char * or strings.

One big issue I see with this approach is those vectors will have to be huge, if the index represents the source node and the value represents the target node.

Anyone know of any strategies I could for making the visited and route vectors a more reasonable size? How could I go about representing the long longs as ints? (Not all of the numbers are powers of 2)