Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML DOM Not Working Right with FileToStr()
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
XML DOM Not Working Right with FileToStr()
Miscellaneous
Thread ID:
00640665
Message ID:
00640665
Views:
100
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")
Next
Reply
Map
View

Click here to load this message in the networking platform