The help for XMLAdapter covers what type of schemas XMLAdapter supports. You shouldn't expect it to work if your XML schema is not one of them. In such case you can use XMLDOM or SAX to process XML. Sometimes a simple preprocessing of XML can make it XMLAdapter complient. See
Re: XML to Table Thread #
1124864 Message #
1124924, for example.
>LOCAL loAdapter as XMLAdapter
>a= .f.
>CLOSE TABLES ALL
>CLEAR
>DIR *.xml
>loAdapter = CREATEOBJECT("XMLAdapter")
>WITH loAdapter as XMLAdapter
> .XMLSchemaLocation="test.xsd"
> .RespectNesting =.t.
> a=.LoadXML([test.xml],.t.,.t.)
>
>=> Program error: XML Schema is too complex
>
>Are there any known objection why VFP is unable to manage a bit complicated hierrarchy? Or did I forget some switches to set?
>
>In the case I use :
>
>.XMLSchemaLocation=""
>
>Adapter object is created but loAdapter.tables.count=0
>
>Using XMLSpy I managed to create 6 tables on MSSQL correctly.
>XML and XSD are valid (validated using Altova XMLSpy)
>
>VFP9; MSXMLDOM4
>
>If I use DOM it works fine, but using XML adapter would be a much more easiest.
>XMLString=[test.xml]
>loXml = CreateObject("MSXML2.DOMDocument.4.0")
>loXml.Load ( YourXMLString )
>=STRTOFILE(loXml.xml,"test",0)
>=> this works fine
>
--sb--