Update XML datasource, why does it different with other?
CursorAdapter and XMLAdapter were introduced in VFP8. However, I just try it out recently. I plan to use XML file as data source for my system configuration. Thank you Cetin Basoz for helping me to make my code works.
CA=CREATEOBJECT("CURSORADAPTER")Why couldn't we just call TABLEUPDATE() to commit changes?
xa=CREATEOBJECT("xmladapter")
xa.LoadXML("myxml.xml",.T.)
ca.SelectCmd="xa.tables.item(1)"
ca.DataSourceType="XML"
ca.CursorFill()
xa.Tables.Item(1).ToCursor()
xa.ReleaseXML(.F.)
*-- Make some changes here
xa.ToXML('updated.xml','',.T.)
0 Comments:
Post a Comment
<< Home