Help for this page

Select Code to Download


  1. or download this
    my $xpc = XML::LibXML::XPathContext->new( $doc );
    $xpc->registerNs( ota => 'http://www.opentravel.org/OTA/2003/05' );
    my @options = $xpc->findnodes('//ota:OriginDestinationOption');
    
  2. or download this
    # Doesn't work because OriginDestinationOption belong to
    # the http://www.opentravel.org/OTA/2003/05 NS, not the
    ...
    
    my $root = $doc->documentElement();
    my @opts = $root->findnodes("//OriginDestinationOption");
    
  3. or download this
    # Doesn't work because OriginDestinationOption element
    # appears as <OriginDestinationOption>, rather than
    ...
    
    my $root = $doc->documentElement();
    my @opts = $root->findnodes("//ota:OriginDestinationOption");
    
  4. or download this
    my $root = $doc->documentElement();
    my @opts = $root->findnodes("//*[name()="OriginDestinationOption"]');