>*& from your example. >*& >loOutput = CreateObject( "MSXML2.DOMDocument.3.0" ) >*** now i should use .AppendChild() or the like of loOutput to >*** fill in the xml object. >*& >*& Add this line to get the XML raw text. >lcOutputXML = loOutput.documentElement.XML >*& >>
>>PROCEDURE GetCars( InXml as String ) AS String >>LOCAL lcReturn, loXML, loRoot, loElement >>LOCAL loOutput, loOutRoot, loOutElement >> >>LOCAL lOpCode, lCountry >> >>lcReturn = "test" >>*** fills in the xml with the InXml param. >>loXML = CREATEOBJECT( "MSXML2.DOMDocument.3.0" ) >>loXML.loadXML( InXml ) >>loRoot = loXML.documentElement >>*** then i loop through the nodes of loRoot, and do some stuff with it >>*** the result of that stuff should be appended to some new xml string >> >>loOutput = CreateObject( "MSXML2.DOMDocument.3.0" ) >>*** now i should use .AppendChild() or the like of loOutput to >>*** fill in the xml object. >>>>I know i could then use loOutput.Save method to save the xml into a file and then RETURN (FileToStr(thexml.xml)), but that's what i want to avoid. How can i return the xml as a string?
>>>>MyVFPCom( xmlIn, xmlOut )
>>>>Response.Write( xmlOut )
>>>>My problem is with the creation of the xmlOut string. How do i create it? I would like to avoid having to create a .xml file then send the FILETOSTR of the file, but rather just work on memory.