> Basically, the XML file has two key parallelled nodes: <Topic/> and > <ExternalPage/>. If there is a <link/> child existing in <Topic/>, > <ExternalPage/> node will be existing for showing more detailed information > about the content of this <link/> such as <d:Title/> and <d:Description/>. > > However, not every <Topic/> node has one or more <link/> child, so I need > to write a loop to find out if <link/> is a child of <Topic/> nodes. If > there are some <link/> nodes existing, I will check each of <ExternalPages> > to output more information.
Can you provide some relevant code? Looking at the sample xml two handlers immediately come to mind, one for RDF/Topic another for RDF/ExternalPage, both calling different subroutines that use some kind of shared variables as flags indicating which <Topic/> are we currently in, and which links are we looking for when parsing through ExternalPages. Unless both of your <Topic/> and <ExternalPages/> are randomly intermixed (very very very unlikely) and if they are - then you are really screwed :) Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>