Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Don't ask to ask, just ask
 
PerlMonks  

Creating nested elements in XML::Smart

by cirrus (Initiate)
on Dec 11, 2012 at 23:41 UTC ( #1008430=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <Shelf_Info>
               <switch Name="Puebla01">
                   <shelfType>7480</shelfType>
    ...
                   <commentText>ATM access switch</commentText>
               </switch>
    </Shelf_Info>   
    
  2. or download this
    my $XML = XML::Smart->new() ;
    $XML->{Shelf_Info} ;
    $XML->{Shelf_Info}{switch}{Name} = "$pp";
    ...
    $XML->{Shelf_Info}{switch}{commentText} = "$comment";
    $XML->{Shelf_Info}{switch}{commentText}->set_node(2);
    $XML->save('test.xml') ;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1008430]
Approved by bitingduck
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-04-20 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls