Article View: borland.public.delphi.xml
Article #56Re: XML for dummies question
From: Kevin Frevert
Date: Tue, 22 Apr 2008 12:46
Date: Tue, 22 Apr 2008 12:46
26 lines
1742 bytes
1742 bytes
Ralph,
Do you have a XSD for the XML? If so, you can use Delphi's XML
Databinding Wizard to create a proxy class that adheres to your schema. You
then can access the various properties just like any other class.
Ex..
var
Model :IXMLModel;
begin
Model := LoadModel('C:\XML\Model1099.xml'); //helper method creaed by the
wizard.
MainForm.Caption := Model.Name;
lbLength.Caption := Model.Length;
Memo1.Lines.Text := Model.Dimensions;
end;
Good luck,
krf
"RT" <ralph.tuttle@visi.com> wrote in message
news:480d0608$1@newsgroups.borland.com...
>I have a tXMLDocument component and I want to access a specific model id's
>dimensions in the following xml document. What is the appropriate manner
>of accomplishing this simple task.
>
Technical Details
Message-ID:
<480ddd95$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<480d0608$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f5d9b,5ade4737af83f55c X-Google-Attributes: gidf5d9b,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Kevin Frevert" <kevin@workdrinkingicewater.com> Newsgroups: borland.public.delphi.xml References: <480d0608$1@newsgroups.borland.com> Subject: Re: XML for dummies question Date: Tue, 22 Apr 2008 07:46:11 -0500 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 206.29.98.177 Message-ID: <480ddd95$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208868245 206.29.98.177 (22 Apr 2008 05:44:05 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1577