Help for this page

Select Code to Download


  1. or download this
    use XML::Simple;
    use Data::Dumper;
    ...
       <valueTargetPair value="MALE" targetPo="Incoming 1" />
       <valueTargetPair value="FEMALE" targetPo="Incoming 2" />
    </ObjectType>
    
  2. or download this
    $VAR1 = {
      'AppObject' => 'hello',
    ...
      ],
      'AppObjectField' => 'gender'
    };
    
  3. or download this
    my $xml = XMLin(\*DATA);
    bless $xml, $xml->{AppObject};
    warn unless ref $xml eq 'hello';
    
  4. or download this
    my $xml = XMLin(\*DATA);
    foreach my $entry (@{$xml->{valueTargetPair}})
    ...
         print "value=", $entry->{value}, $/;
         print "targetPo=", $entry->{targetPo}, $/;
    }
    
  5. or download this
    value=MALE
    targetPo=Incoming 1
    value=FEMALE
    targetPo=Incoming 2