You can use MSXMLDOM and parse it to a treeview.
>Hi,
>
>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.
Imagination is more important than knowledge