Visual FoxPro does not allow the ToXML method to execute when an XML document is already loaded.
-
Check the IsLoaded property to make sure that a XML document is not already loaded.
-
Use the ReleaseXML method to release the currently loaded XML document.