If you have an (x)harbour object from class TXml, say oXml, you can make a string by calling: oXml:ToString( nStyle ) works too, if you don't pass a parameter for style. The source of the class is in \source\rtl\txml.prg, if you've downloaded (x)harbour ...