I look for the highest-level variable or object inside of the current one.
when figuring out which one to write next.

When I create a <node>, I immediately create it's footer </node>,
then I seperate them, indent, & start filling in what goes between them.
To fill in, I repeat the very first step (highest-level variable within)

I find it's easier to create all the nodes at the current level before figuring out what goes inside them.  That way, I don't have to worry about forgetting anything.
This top-down method may be a good one.
(create all current-level nodes, then go back and fill their contents)
(then do that same once inside a node, start with all top-level objects within it,
 then fill them in)
This top-down method is even better when de-coding XML to variables!
(less object-switching that way)


The XML function doesn't need to create actual XML,
It only needs to build an elaborate String, so I can use string functions.
On the other hand, it's probably easier to insert values between Nodes using XML functions instead of string functions.
