Yes, the documentation on the XML extension is prosaic and I have not been able to fathom it so far so would be great if anyone can help. Stuff like:
"
When we want to walk through the nodes of the tree, first we have to request a new position descriptor from
the extension. Originally a new descriptor points to the root element. The descriptor is in fact a 32 bit identification number whose value has no
interest for the GDL script. The position it refers to can be changed as we move from one node in the tree to another.
" (GDL reference manual)
Huh??
I find tab delimited text files work fine for most things. On a mac if you have 'Numbers' it will open directly into a spreadsheet ( but not save as text ). In XL these can also be imported.
To answer your question, you can search a column to find an identifier and select another row in that column in tab delimited text files. I have done this for titleblocks myself but don't have the script to hand
Here is another example :
DIM stpan [20] [4] !!! array for data
chst= OPEN ("TEXT", "solar_energy.txt" , " MODE = RO, LIBRARY" )
lincont=1
solinp=INPUT (chst, lincont ,1, val1, val2, val3, val4)
WHILE stlpan>0 DO
stpan[lincont] [1]=val1
stpan [lincont][2]=val2
stpan [lincont] [3]=val3
stpan[lincont] [4]=val4
lincont=lincont+1
solinp=INPUT (chst, lincont ,1, val1, val2, val3, val4)
ENDWHILE
CLOSE chst
!!!______________find the row of the identifier parameter
FOR linconti=1 TO lincont
IF stpan [linconti] [1]= identparam THEN !!!where identparam is your identifier
outcomeval= stpan[linconti] [3] !!! where the value to be read is in column 3 and outcomeval is the value.
ENDIF
NEXT linconti
Hope this helps. It is a bit clumsy because there is a problem inserting texti/o into for next loops directly- they don't work!( or last time I tried in AC9)
Richard Swann
MacOS 11.7 , Intel Imac 4k ArchiCAD 4.5-27 (Solo)