I need to create XML in Perl. From what I read, XML::LibXML is great for parsing and using XML that comes from somewhere else. Does anyone have any suggestions for an XML
I don't do much XML, but XML::Smart looks like it might do what you want. Take a look at the section Creating XML Data in the doc and it looks very simple and easy to use.
Paraphrasing the doc:
use XML::Smart;
## Create a null XML object:
my $XML = XML::Smart->new() ;
## Add a server to the list:
$XML->{server} = {
os => 'Linux' ,
type => 'mandrake' ,
version => 8.9 ,
address => [ '192.168.3.201', '192.168.3.202' ] ,
} ;
$XML->save('newfile.xml') ;
Which would put this in newfile.xml:
192.168.3.201
192.168.3.202
Cool. I'm going to have to play with this :)