in reply to Inserting new elements in an XML doc using XML::Twig
XML::Twig::EltYou are providing a list of arrayrefs where it's expecting strings or elements. Maybe do something like:new ($optional_tag, $optional_atts, @optional_content)
The tag is optional (but then you can't have a content ), the $optional_atts argument is a refreference to a hash of attributes, the content can be just a string or a list of strings and element.
push @newElts, XML::Twig::Elt->new( keyword => {translate => 'true'}, +$_ ) for @keywords;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inserting new elements in an XML doc using XML::Twig
by GrandFather (Saint) on Feb 12, 2007 at 10:03 UTC | |
by Herkum (Parson) on Feb 12, 2007 at 19:05 UTC | |
by mirod (Canon) on Feb 12, 2007 at 19:23 UTC | |
by GrandFather (Saint) on Feb 12, 2007 at 20:09 UTC | |
by Herkum (Parson) on Feb 13, 2007 at 03:38 UTC | |
by Tanktalus (Canon) on Feb 12, 2007 at 20:07 UTC | |
by Withigo (Friar) on Feb 22, 2007 at 02:02 UTC |