Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an XML String to be returned by a VFP COM Serve
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00725158
Message ID:
00725216
Views:
10
OK Jaime,

you got me there <g>. I have not used MSXML2.DOMDocument (my one and only XML file I've created is an update log and I build the file using FWRITE()).

Wish I could help more.
James




>Here is some code from my com app:
>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?
>
>Jaime
>
>>Depends on how big your XML string is going to be. If less than 64K, just build the a character text string using a memory variable.
>>
>>Hope that helps (or do I not fully grasp the problem?)
>>
>>
>>>Hi All
>>>Here is the scenario. I have an ASP page that receives as param. an XML string, calls a VFP COM that does some work on it and returns a new XML. This newly created XML is then sent back by the ASP.
>>>The ASP part works well. It basically runs something like
>>>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.
>>>So, how can i create the XML string from the MyVFPCom?
>>>
>>>TIA
>>>Jaime
=======================
J Robert Jernigan
Calabasas, CA USA
jrjernigan@hotmail.com

"To err is human ... I should know, I get to show my humanity everyday!" jrj

"I just love the internet - it takes this great big planet and makes it smaller. Now, why can't we all just get along?" jrj
Previous
Reply
Map
View

Click here to load this message in the networking platform