Sorry overlooked your previous question. Select de single node met de volgende query: descendant::RECORD [EMAIL PROTECTED]'12MANCHEASO'] The words RECORD and 12MANCHEASO are from your XML file and can be varied.
Succes, Gerard van der Sel > -----Oorspronkelijk bericht----- > Van: Vahan Yoghoudjian [mailto:[EMAIL PROTECTED] > Verzonden: vrijdag 25 maart 2005 10:59 > Aan: [EMAIL PROTECTED]; Yahoo Groups: Delphi En > Onderwerp: [delphi-en] RE: [delphi_programers] Reading from > two XML related nodes simultaneously > > > > Ok... the question was too complicated obviously... let > me try to put this in another way.. > > I have an XML node with a number of childnodes each one > identified by an attribute. When I get the parent node can I > position myself in a given child node according to the > attribute value without scanning all the childnodes one by > one until I reach the given node? > > Hope I made myself clear this time > Vahan > > -----Original Message----- > From: Vahan Yoghoudjian [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 22, 2005 11:57 AM > To: Yahoo Groups: XML Doc; Yahoo Groups: Delphi Programmers; > Yahoo Groups: Delphi En > Subject: [delphi_programers] Reading from two XML related > nodes simultaneously > > > Hi Group > > My problem is a problem of speed and optimization, I have > an XML document that I'm supposed import data from into my > application's database tables. I can not change the XML file > structure where I have 2 related tables. I'm using Delphi 6 > and TXML Document to read from the XML file. > Here's my situation. > > Each table is structured as an XML node. I have a table > called "Items", I assign it to a local variable and start > looping all the child nodes to import the data, my problem is > that for each item I have to go to another node which is > called "prices" and get the related prices of the same item > before posting it into my table. As you notice I have two > "tables" in my xml file that are supposed to be stored in one > table in my application. > > Here's a child node from table "Items" > > <RECORD CODE="12MANCHEASO"> > <NAME>1/2 manche pr homme AS offre colle O</NAME> > <DEPARTMENT>STANDARD</DEPARTMENT> > <MANAGECURR>USD</MANAGECURR> > <ITEMTYPE caption="physical item">I</ITEMTYPE> > <ITEMQUANTITYTYPE > caption="single">S</ITEMQUANTITYTYPE> > <QTY1DECIMALS>0</QTY1DECIMALS> > <QTYONHAND>1</QTYONHAND> > <AVGCOST_CUR>1.25</AVGCOST_CUR> > <AVGCOST_USD>1.25</AVGCOST_USD> > <AVGCOST_LBP>1875</AVGCOST_LBP> > <TAXATIONGROUP>STANDARD</TAXATIONGROUP> > </RECORD> > > Here's a child node from table "Prices" > > > <RECORD CODE="12MANCHEASO"> > <RetailCurr>LBP</RetailCurr> > <RetailPriceWithVAT>2,750.00</RetailPriceWithVAT> > <RetailPriceNOVAT>2,500.00</RetailPriceNOVAT> > <RetailDiscountPct>0.00</RetailDiscountPct> > <WholeSaleCurr>LBP</WholeSaleCurr> > > <WholeSalePriceWithVAT>2,750.00</WholeSalePriceWithVAT> > <WholeSalePriceNoVAT>2,500.00</WholeSalePriceNoVAT> > <WholeSaleDiscountPct>0.00</WholeSaleDiscountPct> > </RECORD> > > When I'm positioned on a given node in node "Items" how > can I go directly to the related node in "Prices", the way > I'm doing now is by scanning the child nodes of "Prices" one > by one until I reach the related one and delete it after use > to scan less child nodes next time. It works but it's time consuming > Is there's a better way to do it? > > Sorry for my long and complicated messsage > Thanks in advance > > Vahan > > > [Non-text portions of this message have been removed] > > > Yahoo! Groups Sponsor > ADVERTISEMENT > > > > > > -------------------------------------------------------------- > -------------- > ---- > Yahoo! Groups Links > > a.. To visit your group on the web, go to: > http://groups.yahoo.com/group/delphi_programers/ > > b.. To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > c.. Your use of Yahoo! Groups is subject to the Yahoo! > Terms of Service. > > > > > [Non-text portions of this message have been removed] > > > > ----------------------------------------------------- > Home page: http://groups.yahoo.com/group/delphi-en/ > To unsubscribe: [EMAIL PROTECTED] > Yahoo! Groups Links > > > > > > > > Deze e-mail en de inhoud daarvan is vertrouwelijk. Indien dit bericht niet voor u bestemd is, verzoeken wij u deze e-mail direct aan ons te retourneren en daarna te vernietigen. In dit geval is het ook niet toegestaan deze e-mail en de inhoud daarvan te gebruiken, kopieren of openbaar te maken aan derden. Onze onderneming sluit elke aansprakelijkheid uit in verband met het niet juist, onvolledig of niet tijdig overkomen van de informatie in deze e-mail. This e-mail and its contents are confidential and may be legally privileged. If this e-mail is not intended for you, please contact us immediately by reply e-mail and destroy the e-mail. In this case, please do neither use, nor copy or disclose the e-mail and its contents to anyone. Our company is neither liable for the proper and complete transmission of the information in this e-mail nor for any delay in its receipt. ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

