Howto combine tags with different context via XML::Parser

"Peter Teichert" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
Hi XML::Parser Users

I am new to XML parsing with the XML::Parser. Maybe some of you know the
solution to the following problem:

Description

I want to generate one htmlpage (site) with links to other html pages
(site1, site2)

which will also be created while parsing the following XML file:

<site>

<site1><tag1></tag1></site1>

<site2><tag2><tag1></tag1></tag2></site2>

</site>

The issue is how to detect on which htmlpage (site1 or site 2) the </tag1>
will be inserted

I am using the stream style of XML::PARSER and put the following code in
starttag:

if ($starttag eq "tag1" ) { print $site "tag1"; }

How can I detect the variable $site, whether it is site1 or site2 ?

best regards

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.