>I have two tables in a DBC with a simple single-column PK-FK relationship. I was looking at the VFP7 CursorToXML() function and don't see how I can create a hierarchic XML document from these two tables.
>
>table1
> cKey
> gold
> silver
> copper
>
>table2
> cKey cValue
> gold spoon
> gold fork
> silver spoon
> silver spoon
> silver spoon
> copper fork
> copper knife
>
>
>How can/should I make
>
>
> {xml}
> {row cKey="gold"}
> {cValue="spoon" /}
> {cValue="fork" /}
> {/row}
> {row cKey="silver"}
> {cValue="spoon" /}
> {cValue="spoon" /}
> {cValue="spoon" /}
> {/row}
> {row cKey="copper"}
> {cValue="fork" /}
> {cValue="knife" /}
> {/row}
> {/xml}
>
>
>Help?
>
>Thanks.
>
>By the way, how do you guys get XML to display on the UT?
Steve,
Pre C# and ADO.Net I was using ADO for that. You can create an hierarchical rs with MSDataShape and rs.Save(lcFile, AsxmlConstant) (asXMLConstant probably was 1).
For creating with MSdatashape search for HierarchicalFlexGrid. In sample code after oRecordset.open, oRecordset.save().
Cetin