One could simply iterate over the ODE scene and write out the XML however using the XODE* objects is probably better as you can easily tell the correct attributes from the instance variables.
If I were to code it, it would probably be a two step process like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| public class SomeClass { public XODERoot generateXODETree(World world, Space space) { } }
public class XODERoot { public Document getXODEXML() { }
} |
I may as well make them Serializable as well, that's not too hard at all as they are basically just struts already - a few variables would need to be marked 'transient' but that's about all.
Will.