oXML = CREATEOBJECT('wwXML') oXML.lCreateDataStructure = .t. && Schema *** Create the DTDs for the two tables select CDefFile lcDTD1 = oXML.CreateDataStructureDTD('DefFile','Row_Def') select CFiche lcDTD2 = oXML.CreateDataStructureDTD('Fiche','Row_Fch') *** Create the full DTD lcDTD = '<!DOCTYPE LowLevel [' + CR +; '<!ELEMENT LowLevel (DefFile,Fiche)>' + CR + ; lcDTD1 + lcDTD2 + ; ']>' *** Add the root node manually lcOutput = '<LowLevel>' +CR *** Now create the data XML Sele CDefFile lcOutput = lcOutput + oXML.CreateCursorXML('DefFile','Row_Def',2) select CFiche lcOutput = lcOutput + oXML.CreateCursorXML('Fiche','Row_Fch',2) *** Must add XML header and add the closing DocRoot element lcOutput = [<?xml version='1.0'?>] + CR +; lcDTD + ; CR + lcOutput + ; '</LowLevel>' *** Show it Strtofile(lcOutput,tcXMLFIle)Now How do I restore the two Cursor? Do I use XMLToCursor or I have to split the XML file in two?