XMLAdapter Class

XMLAdapter is a "two-way" class. You can import XML and its contained schema to create tables, or you can create and generate XML from tables.

An XMLAdapter object stores object references to XML Schema and Document Object Model (DOM) nodes. It does not store actual XML schema information or content. An XMLAdapter object contains a Tables collection that contains one or more XMLTable objects and describes XML as Visual FoxPro cursors along with any relational information. Each XMLTable object can also contain a child XMLTable, and, at most, a Fields collection with one or more XMLField objects.

NoteNote

The XMLAdapter class requires Microsoft XML Core Services (MSXML) 4.0 Service Pack 1 (SP1) or later.

Using the XMLAdapter class, you can perform the following tasks:

  • Interpret the following schema formats when you use the XMLAdapter LoadXML and Attach methods.:

    • W3C XML Schemas (XS), W3C XML Schemas (XS) as used with .NET DataSets and SQL-XML

    • Microsoft XML Data Reduced Schema (XDR) as implemented by SQL-XML

    • ADO Recordset Schemas

      NoteNote

      The XMLAdapter LoadXML method might not correctly interpret other XML schema formats as produced by other products.

  • Retrieve XML and its associated schema from an XML source. XMLAdapter factors the contained schema into an XMLTable and its corresponding XMLField objects using the XMLAdapter LoadXML or Attach methods.

  • Create a cursor based on the schema and populate it with data represented by an XMLTable object when you use the XMLTable ToCursor method.

  • Represent changes from a .NET DiffGram to local or remote tables when you use the XMLTable ApplyDiffgram method.

  • Add one or more XMLTable objects to the XMLAdapter Tables collection or specify that the XMLAdapter LoadXML, Attach, or AddTableSchema methods perform this for you.

  • Use the XMLAdapter ToXML method to generate an XML document in W3C XML Schema format from one or more cursors or tables referenced by the XMLAdapter object.

XMLAdapter

Expand imageRemarks

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic