Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Another simple XML Twig question
by mirod (Canon) on Jan 22, 2003 at 16:57 UTC | |
by Anonymous Monk on Jan 22, 2003 at 17:37 UTC | |
|
Re: Another simple XML Twig question
by gjb (Vicar) on Jan 22, 2003 at 16:49 UTC |