Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSXML 4 Parser 1

Status
Not open for further replies.

sstamm

Programmer
Jan 13, 2004
16
US
Is there any way to upgrade VFP9sp2 to use MSXML 6? I remember that the CURSORTOXML() and XMLTOCURSOR() functions were just wrappers for functions in MSXML 4, but since version 4 is past end of life and is not secure I would like to upgrade.

Thanks for any help or guidance,

Steve
 
No, that's hardwired.

I'm not at all a pro on patching or decompiling, but I'm even not sure how backward compatible things are even if you could find the right 4s in the runtime and change them to 6.

But you know VFP itself also is insecure by now, as it's unsupported since 2015? So your logic does not really stand a cross check. I give you a point, XML is more likely to be a target of exploits, but what version do you think is under attack? A version that is old? Because once exploits are known and MS does not fix them they stay loopholes to be used forever? Then think about how widespread MSXML4 is installed? Or should I say slimspread?

Chriss
 
Steve,

CURSORTOXML() and XMLTOCURSOR() are not dependent on the installation of MSXML 4.0, which is required only if you use the XMLAdapter class.

The XML functions CURSORTOXML(), XMLTOCURSOR(), and XMLUPDATEGRAM() can be completely replaced, but I don't know of anyone who actually embraced such (enormous) effort.
 
Indeed data to text is the easier path and was already implemented by Rick Strahl as VFP didn't have any XML functionality.



Chriss
 
Chris, when I said that the XML functions could be totally replaced, it was because VFP has a hook mechanism for these three specific functions that support an external implementation through a COM component. I don't know of such a component ever being written.
 
Hello,

just to add some info :

You may read from even complex xml which cursortoxml cannot basically like this :
Code:
 oxml=Createobject('MSXML2.DomDocument')
  oxml.Async = .T.
  oxml.LoadXML(m.cyourfile)
  oentrys = oxml.getElementsByTagName(m.cyourtagname)

  For Each oe In oentrys
    m.ck1 = oe.getElementsByTagName(m.cyoursubtag1).Item[0].nodetypedvalue
    m.ck2 = oe.getElementsByTagName(m.cyoursubtag2).Item[0].nodetypedvalue
    Insert Into c_yourcursor (x1,x2) Values (m.ck1,m.ck2)
    simplelogwbs(" Batchstatus "+ck1+" "+ck2)
  Endfor
You may add some errorchecking :) and oxml. in commandwindow starts intellisense.

And there is a generic reader on

And there are tools on vfpx :

And there is chilkat (commercial)


Btw :
We often create an xml from data (cursor) just with text/endtext or even cxml = cxml + .....


Regards
tom
 
I see, controlled by _VFP.VFPXMLProgId but this only overrides those 3 functions, not the XMLAdapter.

I think you can use DomDocument of whatever MSXML version you like better for a similar but not exactly the same functionality, as tom shows.


Chriss
 
Yes, Tom, sounds familiar: 0: Class definition MSXML2.DOMDOCUMENT.4.0 is not found.

That's not a problem for distributing an application, though, is it?

I'd not have much security concerns for my own installation, simply because of backups, if anything fails. Steven, I can understand when you are worried about customers, if something fails it falls back to you, but the same is true about VFP itself, isn't it? I stand by what I also said at first, VFP is already longer out of support and not fixed. When you want to prevent any manipulation of the VFP runtimes, DLLs and OCXes used, you can verify checksums or even signatures of the files, besides installing in the protected program files system folders. And that principle also works for the MSXML3 and 4 DLLs.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top