0

Returning HTML

I was trying to create a DataTable format and the issue that I am having is that I'm trying to parse a return value of HTML. If I request a page that returns a 404, I will get back a response that is all parsed out. If I request a page that returns a 200, I get nothing back and I have to use the execute function. Is there no way around that, or do you need to have the execute function to parse HTML. 

If I request an XML page, I do not have a problem and I get an output. Where I am curious is why on a 404 do I get data back, but not on a 200?

3 Replies
  • Do you have a sample query that shows this behavior?<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Jamie R. Rytlewski @ 22 Mar 2012 11:52 AM)</cite></div><blockquote class="quotemain">I was trying to create a DataTable format and the issue that I am having is that I&#39;m trying to parse a return value of HTML. If I request a page that returns a 404, I will get back a response that is all parsed out. If I request a page that returns a 200, I get nothing back and I have to use the execute function. Is there no way around that, or do you need to have the execute function to parse HTML.&nbsp;<br><br>If I request an XML page, I do not have a problem and I get an output. Where I am curious is why on a 404 do I get data back, but not on a 200?</blockquote></div>
    0
  • This is the correct (200) and I get nothing back<br><br>use &quot;http://ibc-static.broad.msu.edu/test/cia.xml&quot;;select * from cia WHERE fieldid=&#39;2001&#39;<br><br>This is the 404 and I get the error page.<br><br>use &quot;http://ibc-static.broad.msu.edu/test/cia.xml&quot;;select * from cia WHERE fieldid=&#39;20011&#39;<br><br>What would be awesome is to get the data back from the 200. I saw that if I write javascript code in the executable I can get what I&#39;m looking for for the most part, but I&#39;m confused as to why data comes back with a 404 and not the correct page.
    0
  • Looking at the 404 page vs the success page, I see that the success page has a lot of CS, JS, and some kind of template comments while the 404 page has a simpler structure. This is causing an exception in our XML parser - you will probably see the error if you ran the success page through some XML validator.
    0

Recent Posts

in YQL