Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting ADO to XML string
Message
De
23/08/2001 17:32:30
 
 
À
20/08/2001 18:54:07
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00545946
Message ID:
00548355
Vues:
17
>>>>In IE 5.5 I have a XML data island.
>>>>I want to convert it to XML string.
>>>>However, the following program does'nt work since objADOStream is undefined.
>>>>How to convert ADO recordset to XML string in jscript ?
>>>>
>>>>
>>>>result.recordset.MoveFirst();
>>>>var objADOStream;
>>>>result.recordset.save( objADOStream, 1); //1=adPersistXML
>>>>document.frmdoc.RowData.value = objADOStream.ReadText(-1);  //-1=adReadAll
>>>>
>>>
>>>Actually, if the reference to result is the XML data island you can get to the XML source by accessing its XML property, as in result.XML.
>>>
>>>And in your code, I think you would need to instantiate the ADO stream object first before trying to save the contents of the recordset to it. But that is unnecessary if you are trying to get to the XML source.
>>
>>Thank you for the reply.
>>I tried it, but have found that if I have a date type in xml data island,
>>recordset save() method produces unspecified error message, for example using the data:
>>
>>
>>
>>Also, If I add records to recordset, will the result.XML property contain also the changed rows ?
>>
>>I tried to convert a xml string from .save() method to foxpro cursor using
>>Visual FoxPro XMLToCursor() function. However an error "invalid width on decimal places" during call XMLToCursor(). Is it possible to use this function?
>
>How are you retrieving the data island?
>
>The data island is basically an XMLDocument object and you can refer to it either way. So the XML and the recordset should both have the same data.
>
>Take a look at this article at devx for some examples : http://gethelp.devx.com/techtips/dhtml_pro/10min/10min0501/td051501-1.asp

Thank you for the .xml property hint.
I tried result.documentElement.xml and this works. No I try to use wwXML
class.
I try to implement technology described in

http://www.vbxml.com/xml/articles/datatypes/datatypes2.asp

using foxpro in server and javascript in IE.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform