Compartir a través de


Attach Method (Visual FoxPro)

Attaches an existing XML Document Object Model (DOM) document or DOM element, and, optionally, XML schema to the XMLAdapter object.

Attach also sets the XMLAdapter IXMLDOMElement property. In addition, if the XML schema is analyzed, Visual FoxPro repopulates the Tables collection with a new set of XMLTable objects and sets the following XMLAdapter properties to appropriate values:

XMLAdapter.Attach( oDOM [, oSchema ] )

Parameters

  • oDOM
    Specifies an existing Microsoft XML Core Services (MSXML) 4.0 DOM document object or IXMLDOMElement object.

  • oSchema
    Specifies an existing MSXML 4.0 Schema Object Model (SOM) document object, a DOM document object with a schema node as the root element, or IXMLDOMElement object, which represents the schema.

    If you specify a value for oSchema, Visual FoxPro disregards the value of XMLAdapter XMLSchemaLocation and analyzes the schema. Otherwise, XMLSchemaLocation determines whether XML schema is analyzed.

Remarks

Applies To: XMLAdapter Class

The Attach method facilitates loading returned results from Web services where the data set is usually returned as two IXMLDOMNodes with Item(0) as the schema (oSchema) and Item(1) as the data (oDom). You can attach these two nodes instead of calling LoadXML against a string.

The following property settings affect how the Attach method is executed:

See Also

Reference

XMLAdapter Object Properties, Methods, and Events

IXMLDOMElement Property

Tables Collection (XMLAdapter)

XMLField Class

LoadXML Method

Other Resources

Methods (Visual FoxPro)