wwBusinessObject::loadfromxml

Imports object data from an XML string or XMLDOM object.

o.loadfromxml(lvXML,lnMode)

Return Value

.T. or .F.

Parameters

lvXML
XML string of XMLDOM object that contains the XML to import from.

lnMode
0 - Imports only the oData member. 2 - Hierarchical import. Imports the entire object and all sub-objects.

Example

*** This example copies an object and saves it into the database
o = CREATEOBJECT("wwDevRegistry")
? o.load(3)  && load a record
? o.ConvertData(6)   && Export entire object hierarchy

lcXML = o.cResultXML
ShowXML(lcXML)

*** Create a new object
o2 = CREATEOBJECT("wwDevRegistry")
o2.Load(0)           && Empty object
? o2.LoadFromxml(lcXML,2)

? o2.oData.Address

*** Must create a new PK for new item
o2.oData.Pk = o2.CreateNewId()

*** Write it out to disk
? o2.Save()

See also:

Class wwBusinessObject

© West Wind Technologies, 1996-2019 • Updated: 11/09/18
Comment or report problem with topic