Help for this page

Select Code to Download


  1. or download this
    my $xp = XML::XPath->new(filename => $file);
    $plantdata->{nodeset} = $xp->find('//loop_device[@loop_number="1"]');
    
  2. or download this
    foreach my $device ($plantdata->{nodeset}->get_nodelist()) {
      $devicename = find('devicename')->string_value;
    ...
    
      do more stuff
    }
    
  3. or download this
    if ($devicetype eq "complex") {
      $seachstring = sprintf "//loop_device[@devicename=\"%s\"]/subdevice"
    +, $devicename;
      $subdevice = $xp->find($searchstring);
    }
    
  4. or download this
    $subdevice = $device->find('/subdevice');