Thanks to everyone for your help so far, I have now got a number of nested tables outputing the correct XML, almost.
One problem is that I cannot seem to get XMLTable.Nest() to nest a node unless the tables are related, basically we want an outside header node with the child table inside it. Actually that brings me on to another problem, is there anyway that the ChildTable.ParentId fields can be removed, they are obviously necessary to relate the tables when creating the XML but these fields are not part of the schema so I would luike to remove them, any suggestions?
Thx,
Nick