Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Creating nested elements in XML::Smart

by cirrus (Initiate)
on Dec 11, 2012 at 23:41 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found