开发者

how to use TFHpple in iphone

i use this code for html file but it not working how to solve it some one help

it show this message /Users/pradeepyadav/Desktop/htmldemo/TestHtml.m:45:0 /Users/pradeepyadav/Desktop/htmldemo/TestHtml.m:45: warning: 'TFHpple' may not respond to '-search:'

- (void)viewDidLoad {
    [super viewDidLoad];


    NSData *data = [[NSData alloc] initWithContentsOfFile:@"example.html"];

    // Create parser
    xpathParser = [[TFHpple alloc] initWithHTMLData:data];

    //Get all the cells of the 2nd row of the 3rd table 
    NSArray *elements  = [xpathParser search:@"//table[3]/tr[2]/td”];//here i get message search is not use in TFHpple.h

    // Access the first cell
    TFHppleElement *element = [elements objectAtIndex:0];

    // Get the text within the cell tag
    NSString *content = [element content];  

    [xpathParser release];
    [data release];





}





This Is my html file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Ryanair.com</title><link rel="stylesheet" type="text/css" href="css/Ryanair/Standard.css" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:usr="urn:the-xml-files:xslt"><link rel="stylesheet" type="text/css" href="css/Ryanair/datePicker.css" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:usr="urn:the-xml-files:xslt"><script type="text/javascript" src="/data/js/skysales_3F5DBD0632207A3932CD626AEDC1A849.js"></script><script type="text/javascript" src="/data/js/skysales_B5A6631CD62DEC33073F138AE4A7C8D2.js"></script><script src="http://www.google.com/jsapi"></script><script type="text/javascript" charset="utf-8">
        google.load('ads.search', '2');
    </script><script type="text/javascript" language="javascript" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:usr="urn:the-xml-files:xslt">
  Date.dayNames=['Sunday','Monday','Tuesday','Wednesday','Thusday','Friday','Saturday'];
  Date.monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];
  if (typeof jQuery != 'undefined') {
    $.dpText={
      TEXT_PREV_YEAR:'Previous year',
      TEXT_PREV_MONTH:'Previous month',
      TEXT_NEXT_YEAR:'Next year',
      TEXT_NEXT_MONTH:'Next month',
      TEXT_CLOSE:'Close',
      TEXT_CHOOSE_DATE:' '
    };
  }

  var datePickerFormat='yyyy-mm-dd';
  var datePickerDelimiter='-';
  Date.format=datePickerFormat;
        var pln="en";
        var pcu="IE";
</script></head><body><noscript xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:usr="urn:the-xml-files:xslt"><p class="error noprint">
  ERROR:
  This service makes use of Javascript, which appears to be turned off.
  Click <a href="activateJavascript.htm">here</a> to learn how to activate it.
</p></noscript><form novalidate="true"method="post" action="FRSelect.aspx" id="SkySales" ><div><input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value=""><input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value=""><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUBMGRkg4UKvNNb1NbM14/2n9zUxhNQ++A="></div><div id="header" style="width: 100%;"><div id="blu"><a href="http://www.ryanair.com"><img src="Images/Ryanair/logoyelbg.gif" width="228" height="42" alt="Ryanair.com Homepage" title="Ryanair.com Homepage"></a></div><div id="yel" onclick="this.firstChild.innerHTML='WWW156 2011-09-29 06:31:09 reglixj3c555jw1v|413894465 ';"><span title="DNS: www156 62.73.129.156 10.37.2.156 "> </span>Search » <b>Select</b> » Services » Payment » Itinerary</div><input type="hidden" id="sysdate" value="2011-09-29"><input type="hidden" id="systime" value="06:31:09"></div><div><div id="body"><div id="wrapper"><div id="error"><input type="hidden" name="errorlist" value=""><script language="Javascript" type="text/javascript">
  $(document).ready(function(){
    var msg = "";          

    if (msg.length  > 0) {
      msg = msg.replace(/([\.|:])\s*([^\.]+)/g,"$1``$2") 
      var msg_array = msg.split("``");
      var newMsg = "";
      for (var idx = 1; idx < msg_array.length + 1; idx++){
        if (newMsg.indexOf(msg_array[msg_array.length - idx]) == -1)  { 
          newMsg = msg_array[msg_array.length - idx] + "\n" + newMsg ;
        }
      }
      alert(newMsg);
    }
  });
</script></div><div id="main"><p><b>Here are the flights and fares available on the requested date(s).</b></p><ol><li>Select the flight of your choice.</li><li>Click on the fare name to see the fare rules.</li></ol><script language="javascript" type="text/javascript">
    $(document).ready(function() {          
      var minDepArr = ('2011 09 29 12 31').split(' ');
  var minDep = new Date(minDepArr[0],minDepArr[1]-1,minDepArr[2],minDepArr[3],minDepArr[4]);


  $(".avlLst").each(function(){
   if($(this).find("input[type='radio']").size() == 0){
      $("input[id$='_ButtonSubmit']").attr('disabled', 'disabled').css('background-color','#C0C0C0');
    }
  });


  $("input[type=radio]").each(function() {
  var re = new RegExp("[0-9]{2}\/[0-9]{2}\/[0-9]{4}\\s[0-9]{2}\:[0-9]{2}");
  var m = re.exec($(this).val());
  if(m != null){
  var regexp = /([0-9]{2})(\/)([0-9]{2})(\/)([0-9]{4})(\s)([0-9]{2}):([0-9]{2})/gi;
  var depArr = m[0].replace(regexp,'$5 $1 $3 $7 $8').split(' ');
  var dep = new Date(depArr[0],depArr[1]-1,depArr[2],depArr[3],depArr[4]);
  if(dep <= minDep){
          $(this).attr('disabled', 'disabled').attr('checked','');
          }
      }
      });
    });

  function setTabIndex(marketIndex, index){
  var fld=['',
  ''];
  var i=marketIndex==1?0:1;
  document.getElementById(fld[i]).value = index;
  postBack();
  }

  function postBack(){
  ;
  }

  var pleaseWaitMessage = 'Please Wait...';
  var marketHeaders = ['','Going Out','Coming Back'];

  function feesTaxes(fltKeys,names){
  var mkts=[];
  for(var k in names){
  var market=names[k].charAt(names[k].length-1);
  mkts.push(market);
  $("div#taxAndFeeInclusiveDivBody"+market).css('background-color','#A3AECC').find(".hdr").html('<span>'+pleaseWaitMessage+'</span>').css('background-color','#FFFF99')
  .ajaxError(function(evt,req,sett){
  $(this).html('<span>Unavailable... try again!</span>').css('background-color','#FFBBBB');
  });
  }
  $.get("FRTaxAndFeeInclusiveDisplay-resource.aspx",
  {'flightKeys':fltKeys.join('+++'), 'numberOfMarkets':fltKeys.length, 'keyDelimeter':'+++'},
  function(data,stat){
  $htm=$(data);
  for(var i=0,ml=mkts.length;i<ml;i++){
    if($($htm[i]).html().match(/RefreshWindow/) ) {                 
      window.location.reload(true);
    }       
  $("div#taxAndFeeInclusiveDivBody"+mkts[i]).css('background-color','white').html('<p class="hdr">'+marketHeaders[mkts[i]]+'</p>'+$($htm[i]).html());
  }
  $('big#totalPrice').text($($htm[$htm.size()-1]).text());
  }
  );
  }      

  function selFlight(o){
  if(!o) return false;      
  $(o).parents('table:first').find("div[class^='planeImg']").css('background-position','top left');      
  $(o).parents('table:first').find("tr").removeAttr('class');
  var tro=$(o).parents('tr:first').attr('class','on');      
  var pval=[],pname=[],doJson=true;     

  var A=parseIDDate(tro.attr("id"));      
  var outDTarr=new Date(A[1],A[2],A[3],A[4]+1,A[5],A[6]);      

  $(".avlLst table").each(function(){        
    var $chkbs=$(this).find("input[type='radio'][name*='market']");       

  if(A[0]==1 && $chkbs.is("input[name*='market2']"))
  {          
      $chkbs.each(function(){
        var troB=$(this).parents('tr:first');
        var B=parseIDDate(troB.attr("id"));
        var inDTdep=new Date(B[1],B[2],B[3],B[4],B[5],B[6]);
        if(outDTarr>=inDTdep)
  {
  $(this).attr('disabled', 'disabled').attr('checked','');
  $("div[class^='planeImg']", troB).css('background-position','top left').attr('disabled', 'disabled');
  }else
  {
  $(this).attr('disabled', '');
  $("div[class^='planeImg']", troB).attr('disabled', '');
  }
  });
  }

  var $chkb=$chkbs.filter(':checked');

  if($chkb.size()!=0)
  {
  pval.push($chkb.val());pname.push($chkb.attr('name'));
  $chkb.parent().prev().children('div').css('background-position','top right');      
  }
  else if($chkbs.is(':enabled'))
  {
  doJson=false;
  if(A[0]==1)
  {
  $chkbs.filter(':enabled:first').attr('checked','true').trigger('click');      
  }

  }
  else $("div[id*='taxAndFeeInclusiveDivBody']", this.parent).find("*:not(.hdr)").remove();

  });

  if(doJson)
  {
        feesTaxes(pval,pname);
  }
  }

  function parseIDDate(s){
  var a=s.split('_');
  for(var k in a) a[k]=parseInt(a[k].replace(/^0([0-9]+)/,'$1'));
  return a;
  }

  var nbrMarkets=2;

  var dateRanges=[[],[new Date(2011,9,2), new Date(2011,9,2)],[new Date(2011,9,5), new Date(2011,9,5)]];
  var localization={
  inPast:'You cannot search earlier than the current date.',
  datesOverlap:'Your outbound date range cannot overlap your return date range',
  timesOverlap:'Please recheck the flights you selected\nYour second flight(s) must DEPART at least 1 hour(s) after your first flight(s) ARRIVES!',
  bookToday:'Unfortunatley due to security restrictions, If you wish to book a flight departing today.\nYou must either make the booking through your local RYANAIR CALL CENTER or at the AIRPORT.'
  };

  function checkDate(market,days){
  var flexi=Math.abs(days)==7?true:false;
  var idx=days>0?1:0;
  var today=new Date(), tomorrow=new Date(); tomorrow.addDays(1);
  if(idx==0 && dateRanges[market][idx] <= today){
  alert(localization['inPast']);
  return false;
  }
  if(nbrMarkets > 1){
  var overlap=false;
  if(market==2 && idx==0 && dateRanges[market][idx] <= dateRanges[market-1][idx]) overlap=true;
  else if(market==1 && idx==1 && dateRanges[market][idx] >= dateRanges[market+1][idx]) overlap=true;
  if(overlap){
  alert(localization['datesOverlap']);
  return false;
  }
  }
  return true;
  }     

  function checkTimes(){
  if(nbrMarkets < 2) return true;
  var DA=[0,0];
  $(".avlLst table input[type='radio']:checked").each(function(){
  var A=parseIDDate($(this).parents("tr:first").attr("id"));
  DA[A[0]-1]=new Date(A[1],A[2],A[3],A[4],A[5],A[6]);
  });
  $("input[id*='oTime']").each(function(){
  var A=parseIDDate($(this).val());
  DA[A[0]-1]=new Date(A[1],A[2],A[3],A[4],A[5],A[6]);
  });
  if((DA[1]-DA[0]) <= (60*60*1000)){
  alert(localization['timesOverlap']);
  return false;
  }
  return true;
  }

$(document).ready(function(){
  // This could probably be cleaned up
  $("a[id*='LinkButtonNextDay1']").click(function(){return checkDate(1,1);});
  $("a[id*='LinkButtonNextWeek1']").click(function(){return checkDate(1,7);});
  $("a[id*='LinkButtonPreviousDay1']").click(function(){return checkDate(1,-1);});
  $("a[id*='LinkButtonPreviousWeek1']").click(function(){return checkDate(1,-7);});
  $("a[id*='LinkButtonNextDay2']").click(function(){return checkDate(2,1);});
  $("a[id*='LinkButtonNextWeek2']").click(function(){return checkDate(2,7);});
  $("a[id*='LinkButtonPreviousDay2']").click(function(){return checkDate(2,-1);});
  $("a[id*='LinkButtonPreviousWeek2']").click(function(){return checkDate(2,-7);});

  $("a[id*='tab_']").click(function(){
  var A=this.id.split("_");
  var tabDate=new Date(A[2],A[3]-1,A[4]);
  var dtime=new Date(), today=new Date(dtime.getFullYear(),dtime.getMonth(),dtime.getDate());
  return true;
  });

  $("table[id*=ttable] th").click(function(){
    eval($(this).find("a").attr("href"));
   }).hover(function(){
    $(this).find("a").css("text-decoration", "underline");
    },function(){ $(this).find("a").css("text-decoration", "none");
  });

  $(".avlLst table").find("div[class^='planeImg'],input[type='radio']").click(function(){selFlight(this);});
  var firstRadio=null;
  $(".avlLst table").each(function(){
  var $chkbs= $("input[type='radio'][name*='market'][lwst='true']:enabled:first", this);
  if($chkbs.size() == 0){
    $chkbs = $("input[type='radio'][name*='market']:enabled:first", this);
  }
  $chkbs.each(function(){
  $(this).attr('checked','checked').parents('tr:first').attr('class','on');
  if(firstRadio==null) firstRadio=this;
  });
  var filter=function(){
  var flnum=this.value.replace(/.*FR~\s*(\d+)~.*/, 'FR$1');
  var a=preselectflights.split(',');
  for(var i=0;i<a.length;i++) if(a[i].replace(/\s/g, '')==flnum) return true;
     return false;
  };

  if(preselectflights!=''){
      $("input[type='radio'][name*='market']:enabled", this).filter(filter).eq(0).each(function(){
  $(this).attr('checked','checked');
  firstRadio=this;
  });
  }
  });
  $(firstRadio).trigger('click');

  displayPopUpFareRule = getFareRule;
  displayPopUpFareRule('K','K2LOW|K|FR|BND2||en-IE','ADT');
  });
  var preselectflights='';

function getFareRule(classOfService, fareRuleKeys, paxTypes){
  var url='FareRules.aspx?fareRuleKeys=' + fareRuleKeys +'&class=' + classOfService + '&paxTypes=' + paxTypes;
  $('div#fareRules').load(url + ' #main h2,#main div', function() {
    $('#main div.avlLst > table td:nth-child(3)').each(function(index, cell) { $(cell).wrapInner('<a href="#" onclick="return false;"></a>'); });
    $('#fareRules').jqm({overlay: 30, modal: false, onShow: showFareRules}).jqmAddTrigger('#main div.avlLst > table td:nth-child(3) *').jqmAddClose('#fareRules h2 span');
  });
}

function showFareRules(hs)
  {
    var pos = $(hs.t).offset();
    var width = $(hs.t).width();
    $('#fareRules').css( { 'left': (pos.left + width) + 'px', 'top': pos.top + 'px' });
    hs.w.show();
  }

</script><div class="avlBlk"><h2>Going Out <span>From Aarhus - Malaga</span></h2><table><tr><td align="left" class="chgOff"><a id="AvailabilityInputFRSelectView_LinkButtonPreviousDay1" href="javascript:__doPostBack('AvailabilityInputFRSelectView$LinkButtonPreviousDay1','')">« Previous Day</a></td><td align="right" class="chgOn"><a id="AvailabilityInputFRSelectView_LinkButtonNextDay1" href="javascript:__doPostBack('AvailabilityInputFRSelectView$LinkButtonNextDay1','')">Next Day »</a></td></tr></table><div class="avlLst avlLst1"><p id="taxAndFeeInclusiveDivHeader1"><b>Select A Flight</b></p><div id="taxAndFeeInclusiveDivBody1" class="drilldown"><p class="hdr">Select a Flight</p></div><table><tr id="1_2011_9_2_23_05_00"><td><div class="planeImg1" title="Click to select this fare on this flight"></div></td><td><input id="AvailabilityInputFRSelectView_RadioButtonMkt1Fare1" type="radio" name="AvailabilityInputFRSelectView$market1" value="K~K2LOW~BND2~~RoundFrom|FR~2523~ ~~AAR~10/02/2011 19:30~AGP~10/02/2011 23:05" onclick="return raise('SelectFare', new SelectFareEventArgs(1, 1, 'K'))" required="true" requiredError="Please select a flight and fare in every market." checked lwst="true"></td><td>Regular Fare</td><td>Adult<br&g开发者_StackOverflow社区t;</td><td align="right" style="font-size:110%;">449.00 DKK<br></td><td></td><td><b>Sun</b>2 Oct 11<br><b>Flight</b>FR 2523</td><td>19:30 Depart<br>23:05 Arrive</td></tr></table><div style="clear:both; width: 100%; text-align: center;"><a href="javascript:infoWin('trvfee',0,0,'EN')">Fares do not include optional fees/charges. For a full list of Ryanair fees, please click here</a></div><div class="clr"></div></div></div><div class="avlBlk"><h2>Coming Back <span>From Malaga - Aarhus</span></h2><table><tr><td align="left" class="chgOff"><a id="AvailabilityInputFRSelectView_LinkButtonPreviousDay2" href="javascript:__doPostBack('AvailabilityInputFRSelectView$LinkButtonPreviousDay2','')">« Previous Day</a></td><td align="right" class="chgOn"><a id="AvailabilityInputFRSelectView_LinkButtonNextDay2" href="javascript:__doPostBack('AvailabilityInputFRSelectView$LinkButtonNextDay2','')">Next Day »</a></td></tr></table><div class="avlLst avlLst1"><p id="taxAndFeeInclusiveDivHeader2"><b>Select A Flight</b></p><div id="taxAndFeeInclusiveDivBody2" class="drilldown"><p class="hdr">Select a Flight</p></div><table><tr id="2_2011_9_5_15_50_00"><td><div class="planeImg2" title="Click to select this fare on this flight"></div></td><td><input id="AvailabilityInputFRSelectView_RadioButtonMkt2Fare1" type="radio" name="AvailabilityInputFRSelectView$market2" value="C~C2LOW~BND2~~RoundFrom|FR~2522~ ~~AGP~10/05/2011 15:50~AAR~10/05/2011 19:30" onclick="return raise('SelectFare', new SelectFareEventArgs(2, 1, 'C'))" required="true" requiredError="Please select a flight and fare in every market." checked lwst="true"></td><td>No Taxes</td><td>Adult<br></td><td align="right" style="font-size:110%;">379.00 DKK<br></td><td></td><td><b>Wed</b>5 Oct 11<br><b>Flight</b>FR 2522</td><td>15:50 Depart<br>19:30 Arrive</td></tr></table><div style="clear:both; width: 100%; text-align: center;"><a href="javascript:infoWin('trvfee',0,0,'EN')">Fares do not include optional fees/charges. For a full list of Ryanair fees, please click here</a></div><div class="clr"></div></div></div><div class="section right" style="width:38%;padding:4px;"><div class="bld" style="font-size:16px;margin-bottom: 4px;"><p style="float:left;"><big>Total</big></p><p class="rght"><big id="totalPrice">Please Wait...</big></p></div><p><small>Optional charges such as administration and checked baggage fees are not included.<br><a href="javascript:infoWin('trvfee',0,0,'EN');">Click here for details</a></small></p></div><div style="display: none; border: 1px solid black; position: absolute; background-color: white; width: 33%; padding: 0 5px 5px 5px;" id="fareRules"></div><div class="btnRight"><input class="buttonRight" onClick="return validate(this) &amp;&amp; checkTimes() &amp;&amp; preventDoubleClick();" type="submit" name="AvailabilityInputFRSelectView$ButtonSubmit" value="Select and Continue" id="AvailabilityInputFRSelectView_ButtonSubmit"><button id="NewSrch" class="button" onclick="&#xA;                  window.location='FRSearch.aspx';&#xA;                &#xA;          return false;&#xA;        ">New Search</button><style type="text/css">
  .ad_header {color:#191970;font-weight:bold;font-size:11px}

             .ad_line1 {color:#0000FF;font-size:13px; text-decoration:underline}
             .ad_url {color:#008000;margin-bottom:12px; text-decoration:none}

  .ad_text {color:#191970;text-decoration:none}
  .wide_ads {padding:5px;}
  div.ads ul {margin: 0px; list-style: none;}
     .narrow_ads {padding:2px;position: absolute; top: 100px; left: 780px; width:200px;}
</style><div id="wide_ad_unit" class="ads wide_ads"></div><div id="narrow_ad_unit" class="ads narrow_ads"></div><script type="text/javascript" charset="utf-8">  

    var channels = {'DE':'1901616133','ES':'1730142402','FR':'4307283847','GB':'3975277388','IE':'0091594208','IT':'9330300293','NL':'6066899700','PL':'0911139945','SE':'1735271438','Other':'1974134150'};        
    var channelid= channels['IE'];           
    if (channelid == null) channelid='1974134150';     

var pageOptions = {
    'pubId' : 'pub-3031568651010206',
    'query' : 'Malaga Flight',
    'channel' : channelid,
    'linkTarget' : '_blank',
    'siteLinks' : true,
    'sellerRatings' : true
    };

var adblock = {
'container' : 'narrow_ad_unit',
    'number' : 8,
'width' : '250px',
    'lines' : 3,
'fontFamily' : 'verdana',
'colorText' : '#191970',
    'fontSizeTitle' : '13px',
'fontSizeDescription' : '11px',
'fontSizeDomainLink' : '11px',
'colorBackground' : '#BFD6F7',
    'colorDomainLink' : 'blue',
    'colorBorder' : '#BFD6F7'
};

    var adblock2 = {
    'container' : 'wide_ad_unit',
    'number' : 5,
    'width' : '400px',
    'lines' : 3,
    'fontFamily' : 'verdana',
    'colorText' : '#191970',
    'fontSizeTitle' : '13px',        
    'fontSizeDescription' : '11px',
    'fontSizeDomainLink' : '11px',
    'colorDomainLink' : 'blue',
    'colorBackground' : 'white',
    'colorBorder' : 'white' 
};
    new google.ads.search.Ads(pageOptions, adblock);

</script><div id="YahooBottomSelectAds"></div><script type="text/javascript">
  $(document).ready(function(){
    keywordsToUse = "Malaga Flight";
    resultsHeader = "Sponsored Listings";
    currentLanguage = "en";
    currentCulture = "IE";
    destination = "Malaga";

    YahooAds_SetFrame();
  });
</script></div></div></div><div class="clr"></div><div id="footer"><div id="fLinks"><a href="http://www.ryanair.com" title="Home">Home</a> | <a href="http://www.ryanair.com/site/EN/faqs.php" title="F.A.Q." target="_blank">F.A.Q.</a> | <a href="http://www.ryanair.com/site/EN/conditions.php?view=privacy" title="Privacy Policy" target="_blank">Privacy Policy</a> | <a href="http://www.ryanair.com/site/EN/conditions.php" title="General Terms &amp; Conditions of Carriage" target="_blank">General Terms &amp; Conditions of Carriage</a> | <a href="http://www.ryanair.com/en/terms-and-conditions/copywrite" title="Terms of Use" target="_blank">Terms of Use</a> | <a href="http://www.ryanair.com/site/EN/faqs.php?sect=CONTACT&amp;div=int_sup" title="Contact Us" target="_blank">Contact Us</a> | <a href="javascript:infoWin('trvfee',0,0,'EN');" title="Fees">Fees</a></div><div id="copyr">Copyright 2009 Ryanair Ltd.</div><input type="hidden" id="language" value=""><input type="hidden" id="culture" value=""><script type="text/javascript"> xtnv=document; xtsd=(window.location.protocol.indexOf('https:')==0?'https://logs152':'http://logc158'); xtsite=(window.location.hostname.indexOf('www.bookryanair.com')!=-1)?'384235':'385193'; xtn2="3"; xtpage="BookingProcess_IE::Select"; xtdi="1"; xt_multc="&x1=2&x2=20111002&x3=20111005&x4=AAR&x5=AGP&x6=1&x7=3"; if(window.xtparam!=null) window.xtparam+=xt_multc; else window.xtparam=xt_multc; </script><script type="text/javascript" src="js/Ryanair/xtcore.js"></script><noscript><img width="1" height="1" alt="" src="http://logc158.xiti.com/hit.xiti?s=384235&amp;s2=3&amp;p=BookingProcess_IE::Select&amp;di=1"></noscript></div></div></div><div class="clr"></div><script type="text/javascript"> 

// var theForm = document.forms['SkySales']; if (!theForm) { theForm = document.SkySales; } function _doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm._EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //

                function register(eventName, functionName)
                {
                    if (eval(events[eventName]) == null)
                    {
                        events[eventName] = new Array();
                    }
                    events[eventName][events[eventName].length] = functionName;
                }

                function raise(eventName, eventArgs)
                {
                    var undefined;

                    if (events[eventName] != undefined)
                    {
                        for (var ix=0; ix<events[eventName].length; ix++)
                        {
                            if ( eval(events[eventName][ix] + "(eventArgs)") == false)
                            {
                                return false;
                            }
                        }
                    }

                    return true;
                }
            // --></script><script language="javascript" type="text/javascript"><!-- 
                function SelectFareEventArgs(marketIndex, fltIndex, classOfService)
                {
                    this.paxFares   = marketPaxFares['mkt'+marketIndex+'|flt'+fltIndex+'|'+classOfService];
                    this.marketIndex = marketIndex;
                }
            // --></script><script language="javascript" type="text/javascript"><!-- 
            function AvailabilityInputFRSelectView_Validate(eventArgs)
            {

                var dots;
                var sel;
                var numOfMkts = 2;
                var msg = new Array (
            "", "", 

                0 );

                for (var i = 1; i <= numOfMkts; i++)
                {
                    sel  = '';
                    dots = document['SkySales']["AvailabilityInputFRSelectView$market" + i];

                    if (dots == null) 
                    {
                        alert("");
                        return false;
                    }
                    else if (dots[0]) // array
                    {
                        for (var j = 0; j < dots.length; j++)
                        {
                            if (dots[j].checked)
                            {
                                sel = dots[j].value;
                                break;
                            }
                        }
                    }
                    else // single
                    {
                        if (dots.checked)
                        {
                            sel = dots.value;
                        }
                    }

                    if (sel == '')
                    {
                        alert(msg[i-1]);
                        return false;
                    }
                }

                return true;
            }


            function displayPopUpFareRule(classOfService, fareRuleKeys, paxTypes)
            {
                var url = '/skysales/FareRules.aspx?fareRuleKeys=' + fareRuleKeys +'&class=' + classOfService + '&paxTypes=' + paxTypes;

                if (!window.fareRuleWindow || fareRuleWindow.closed)    // has not yet been defined
                {
                    fareRuleWindow = window.open(url,'fareRule','width=250,height=251,toolbar=0,status=0,location=0,menubar=0,scrollbars=1,resizable=0');
                }
                else
                {
                    fareRuleWindow.open(url,'fareRule','width=250,height=251,toolbar=0,status=0,location=0,menubar=0,scrollbars=1,resizable=0');
                    fareRuleWindow.focus();
                }
            }

            // --></script><script language="javascript" type="text/javascript"><!-- 
                                function paxFare(paxTypeDesc,classDesc,fareRuleKey)
                                {
                                    this.paxTypeDesc = paxTypeDesc;
                                    this.classDesc = classDesc;
                                    this.fareRuleKey = fareRuleKey;
                                }
                                var marketPaxFares = new Array();

                marketPaxFares['mkt1|flt1|K'] = new Array();

                        marketPaxFares['mkt1|flt1|K'][0] = new paxFare('Adult','Regular Fare','K2LOW|K|FR|BND2||en-IE');

                marketPaxFares['mkt2|flt1|C'] = new Array();

                        marketPaxFares['mkt2|flt1|C'][0] = new paxFare('Adult','No Taxes','C2LOW|C|FR|BND2||en-IE');

            // --></script><script language="javascript" type="text/javascript"><!-- 
                                function AvailabilityInputFRSelectView_initialize()
                                {

                                } // end of Availability_initialize

            // --></script><script type="text/javascript"> 

// var RegisterFunctionsWithEvents = new Array(register('Validate', 'AvailabilityInputFRSelectView_Validate'), register('WindowLoad', 'AvailabilityInputFRSelectView_initialize')); // //defined in common.js $(document).ready(function(){ WindowInitialize(); });


The TFHpple class doesn't have a search: method. The method you're looking for is searchWithXPathQuery:.


@Rocky this is not an html .this is JavaScript ,and when you trying to execute an xpath search you not get a nil .that's because the table you want is not in the downloaded data ,you can see this table in firefox browser's Developer Tools ,this table is created at runtime with the script above .you can use UIWebView and execute JavaScript from the method stringByEvaluatingJavaScriptFromString to get the innerHTML loaded by webview then use HPPLE . sorry of my bad english.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜