>Michael, I have been using the XMLAdapter for this:
>
> loXMLAdapter = CREATEOBJECT("XMLAdapter")
> loXMLAdapter.AddTableSchema(ALIAS())
> ll_IncludeBefore = .T.
> ll_ChangesOnly = .T.
> ll_IsFile = .F.
> lc_SchemaLocation = ""
> loXMLAdapter.UTF8Encoded = .t.
> loXMLAdapter.IsDiffgram = .f.
> loXMLAdapter.ToXML("lc_XML", lc_SchemaLocation, ll_IsFile, ll_IncludeBefore, ll_ChangesOnly)
>
>The lc_XML thus created has the schema embedded at the start of the XML.
Well, even with this approach, the Character Binary field is still returned as a string. So, it invalidates the proper format. In order to avoid keeping a copy of each table schema side by side to each imported table, I guess I could include a hook for the only table I have that type of field in order to correct it manually at run time. So, I wouldn't have to include the schema tables and would generate them on the fly at run time in order to XMLTOCURSOR() to work properly.