I notice STD.System.Debug.getXMLParseTree(), in the 6.4.16 STD documentation. Great, I've used it and it helps. I was just a bit surprised that, as it stands, it does not generate valid XML. I.e. I have to wrap <row>...</row> tags round the output. It would be nice to have output that one can just cut and paste into an xml editor, e.g. XML notepad.