Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Help with attributes and XML::Simple

by Smaug (Pilgrim)
on Aug 01, 2012 at 08:08 UTC ( [id://984723]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Import format="3.0" fileId="54630000-3141-1404-4310-7F0000014030" fil
    +eCreationDateTime="2012-07-23T06:04:31.415" catalogSource="TLCMz">
    ...
            </Vendors>
        </Catalog>
    </Import>
    
  2. or download this
    use strict;
    use warnings;
    my $xmldoc = XMLin("C:\\dsys.xml");
    print Dumper($xmldoc);
    
  3. or download this
    my $vendors = "$xmldoc->{'Catalog'}->{'Vendors'}";
    
  4. or download this
    my $vendors = "$xmldoc->{'Catalog'}->{'Vendors'}";
    
    foreach my $vendor (@{$vendors->{Vendor}}) {
            print $vendor->{name} . "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-06-18 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.