Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML DOM Not Working Right with FileToStr()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
XML DOM Not Working Right with FileToStr()
Divers
Thread ID:
00640665
Message ID:
00640665
Vues:
106
I am trying to get a binary file into my XML document from inside my VFP .prg and I think I am seeing an interface incompatibility. What do you think?

Fails with
"OLE IDispath exception code 0 from msxml4.dll: Error parsing 'RIFFp0 ' as bin.base64 datatype"

I thought this was supposed to convert binary automatically to base64?
oSendDoc =  CreateObject("Msxml2.FreeThreadedDOMDocument.4.0")
oSendDoc.SetProperty("SelectionLanguage" , "XPath")
oRootElement = oSendDoc.createElement("xml")
oRoot = oRootElement
oSendDoc.appendChild(oRoot)
oXmlPI = oSendDoc.createProcessingInstruction("xml", "version='1.0'")
oSendDoc.insertBefore(oXmlPI, oSendDoc.childNodes(0))
oEnvElement = oSendDoc.createElement("envelope")
oEnvElement.DataType = "bin.base64"
oEnvElement.NodeTypedValue = FileToStr("c:\winnt\media\notify.wav")
oRoot.appendChild( oEnvElement )
oSendDoc.Save("it.xml")
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform