Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   XML (https://www.delphipraxis.net/46-xml/)
-   -   Delphi XPath mit Delphi (https://www.delphipraxis.net/121631-xpath-mit-delphi.html)

the_invincible 1. Okt 2008 14:39


XPath mit Delphi
 
Hallo,

mein erster Post hier.

ich habe hier ein Beispiel XML:

<message type="response" id="a3f2ae129cbff89aebb32ca">
<data type="raw_select">
<table name="M0001_DATA_TABLE" id="abcdefg" select="33321">
<header><column name="COLA" data_type="INT" index="1"/><column name="COLB" data_type="VARCHAR" index="2"/></header>
<row><column index="1">12345</column><column index="2">BONGO</column></row>
<row><column index="1">12345</column><column index="2">BINGO</column></row>
</table>
</data>
</message>

ich brauch eine Zugriffmöglichkeit via XPath

//message/data/table

wie realisiere ich das ?

lieben Gruss
Jan Bludau

shmia 1. Okt 2008 18:47

Re: XPath mit Delphi
 
Hier erst mal ein XML Tutorial: http://www.delphipraxis.net/internal...ect.php?t=8184
Für XPath gibt es zwei Methoden:
selectNodes(XPathAusdruck), wenn du mehrere Knoten als Ergebnis erwartest
SelectSingleNode(XPathAusdruck), wenn du max einen Knoten als Ergebnis erwartest

the_invincible 2. Okt 2008 07:20

Re: XPath mit Delphi
 
vielen dank.

Das klingt schonmal sehr gut.
Auch das Tutorial werde ich mir mal ansehen :-)

Gruss
Jan


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:46 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz