"dom is always null " What the heck is the selector "div/p" supposed to get?
On Apr 4, 5:40 am, Albert <zinki...@gmail.com> wrote: > $(document).ready(function() { > > $.ajax({url: '/page/test.html', > type: 'GET', > dataType: 'html', > timeout: 5000, > error: function(){ > alert('error'); > }, > success: function(data){ > > var dom = $("div/p",data); > $('#parse_result').append(dom); > } > }); > > }); > > // test HTML > <div> > <p><a>test dom tree</a></p> > </div> > > I just can't get the code work because dom is always null > actual html is more complex, I just want to use the xpath to navigate > through the getted html > of course this is perhaps not the best way to do this > > if you know a powerful way( I mean have xpath navigate ability) to > parse html pages at server side please do let me know, thanks very > much