I read throught the perldoc, and I'm still unsure on how to do this.
I want to add two chidlren to my 'ds' tag, and add a comment in the middle of the two children, nor is my comment being written correctly as a comment.
This is what I'm trying for code, but it's not adding them as chidlren
Anyone see what I'm doing wrong?foreach my $attr (@ds) { my $ds_tag= new XML::Twig::Elt( 'ds'); $ds_tag->paste( 'after', $attr); my $unknown= "0"; my $unknown_tag= new XML::Twig::Elt( 'unknown_sec', $unknown); $ds_tag->paste( 'after', $attr); my $comment= " PDP Status "; my $comment_tag= new XML::Twig::Elt( '!--', $comment); $comment_tag->paste( 'after', $attr); my $min= "NaN"; my $min_tag= new XML::Twig::Elt( 'min', $min); $min_tag->paste( 'after', $attr); $ds_tag= new XML::Twig::Elt( 'ds'); $ds_tag->paste( 'after', $attr); }
In reply to Another simple XML Twig question by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |