From: Vyacheslav Karamov <[EMAIL PROTECTED]> > I need to parse XML with XML::Parser::Expat and make XML tree with > Tree::Simple. > But I need to store tag value and its attributes. But > Tree::Simple->setNodeValue() accepts single scalar (value itself). > How to create something like this? > > struct > { > $value; > %attributes; > } $nodeValue; > > Tree::Simple->setNodeValue( $nodeValue); > > > The pseudo code above shows what I actually need. But I don't know how > to implement it.
Why? What do you expect to obtain by storing the structure as Tree::Simple??? If you want to get a maze of objects you can use XML::LibXML, XML::DOM, XML::Twig ..., if you want a data structure there is XML::Rules or XML::Simple. Your request looks like a perfect case of the XY problem (http://en.wikipedia.org/wiki/XY_problem). Tell us what you need to do, not how. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/