🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.xml
Article #54

XML for dummies question

#54
From: RT
Date: Mon, 21 Apr 2008 21:24
55 lines
2583 bytes
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.

myproc
var
  node:IXMLNode;
begin
  xmlDoc.LoadFromFile('.\myRodDNA.xml');
  xmlDoc.Active:=True;
  node:=xmlDoc.ChildNodes[0];
...

XMLdocument:

  <?xml version="1.0" encoding="UTF-8" ?>
- <models module="Models" version="1.2">
- <!-- 
RodDNA v1.1
  -->
- <!-- 
Copyright (c) 2003-2004 by  All Rights Reserved.
  -->
- <!-- 
RodDNA Model's Module
  -->
- <model id="model-9999">
  <name> 8' 3" 6Wt 2p</name>
  <length>99</length>
  <action_length>89</action_length>
  <type>Dry-Fly-Rod</type>
  <const_type>Hex</const_type>
  <line_weight>6</line_weight>
  <line_length>30</line_length>
  <line_cast>30</line_cast>
  <pieces>2</pieces>
  <ferrule1_size>13/64</ferrule1_size>
  <ferrule2_size>None</ferrule2_size>
  <ferrule3_size>None</ferrule3_size>
  <ferrule_type>NS-(Standard)</ferrule_type>
  <ferrule1_loc>49.5</ferrule1_loc>
  <ferrule2_loc>0.0</ferrule2_loc>
  <ferrule3_loc>0.0</ferrule3_loc>
  <tiptop_size>5</tiptop_size>
  <tip_impact_factor>4.0</tip_impact_factor>
  <bamboo_density>0.668</bamboo_density>
  <tip_weight>0.018</tip_weight>
  <station_multiplier>1.0</station_multiplier>
  <station_bias>0.0</station_bias>
  <station_increment>5</station_increment>
  <notes>Hollow built to 60/1000s in butt only</notes>
  <dimensions>0.07, 0.078, 0.091, 0.111, 0.122, 0.138, 0.152, 0.163, 0.183, 
0.196, 0.212, 0.215, 0.224, 0.238, 0.256, 0.268, 0.282, 0.311, 0.341, 
0.341</dimensions>
...etc... 
Technical Details
Message-ID: <480d0608$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f5d9b,5ade4737af83f55c,start
X-Google-Attributes: gidf5d9b,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "RT" <ralph.tuttle@visi.com>
From: "RT" <ralph.tuttle@visi.com>
Newsgroups: borland.public.delphi.xml
Subject: XML for dummies question
Date: Mon, 21 Apr 2008 16:24:23 -0500
Lines: 57
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; Original
NNTP-Posting-Host: 208.42.94.158
Message-ID: <480d0608$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1208813064 208.42.94.158 (21 Apr 2008 14:24:24 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail