Kristin,
XMLAdapter does not create any indexes or set relations for you after generating the cursors, but does set the various nesting-related properties of the XMLTable objects if the hierarchy is one that it understands (like a .NET Dataset).
Are you getting all the cursors created as expected?
>I'm having trouble finding a solution to keep the hierarchy of an XML document when parsing. From the MSDN documentation, it seems like I should be using the XMLAdapter.loadXML() function which populates tables in the XMLAdapter object with the data, but doesn't seem to give any indexes or fields that I can then reconstruct the hierarchy with. I have attached the code below:
>
>LOCAL oXMLAdapter as XMLAdapter
>oXMLAdapter = NEWOBJECT('XMLAdapter')
>oXmladapter.RespectNesting = .T.
>oXMLAdapter.LoadXML(lc_incoming_dir + lc_filename,.T.)
>lc_count = oxmladapter.tables.Count
>FOR x=lc_count TO 1 STEP -1
> oxmladapter.tables.Item(x).tocursor
>ENDFOR
>
>There has to be a way to keep the hierarchy of the XML document, but for the life of me cannot find the code to do it. Any help will be much appreciated. Thanks.