Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using txmldocument

Status
Not open for further replies.

delfy

MIS
Feb 8, 2005
96
JM
how can get the xml from my txmldocument in a dataset and dis play it on a grid

the xml in the xmldocument component looks like this

<perosn_record>
<person>
<name>John Doe</name>
</person>
</person_record>
 
Are we talking Delphi 2005? I guess so, but you need to be clear on this as it is completely different to previous versions, being a .NET language. Although I don't use it, it should share 99% of the functionality with the other .NET languages. In this case the DataSet class should have a LoadXml() method which does exaxtly what you need. However, your XML document will need to be formed differently - most importantly is the embedded schema which defines the record structure and datatypes. There are oodles of resources on the web which explain the layout better than I can. Displaying it on the grid is a simple matter of binding the DataSet to the grid control. BTW you don't need to use a component for the XML document. Just declare and load it inside your function then set it to nil when you're finished.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top