I currently have a section of code that is loading a remote XML (RSS2
or Atom) and then loads all articles. Since we are talking about HTML
inside XML here there is no way for the xml library to realize this,
and there should be no reason for it either.

In any case because of this I find myself in a situation where I have
to convert the HTML parts back to HTML through the use of the xml
library, to store the text in the database as is. I do not want to
output the result of course so I use pipe to grab it instead, like so:

(pipe (xml Html) (till NIL T))

This works fine when I try the "raw" functionality without using the
http server. However, when exactly the same code is called in the real
application (within the context of the http server) the above results
in NIL instead of the HTML. Trying (trace 'pipe) in the server
application just locks up the whole process, doing it in the testcode
gives me this example though:

 pipe : ">" NIL
 pipe = NIL
<div xmlns="http://www.w3.org/1999/xhtml";>
   <p>
      Last night, after the Canadian election
      <a 
href="http://www.cbc.ca/news/canadavotes/debate-english/comments-video.html";>
         party leaders'
         debate
      </a>
..
   </p>
</div>


I've had exactly the same behavior happen to me when calling a ruby
script through (call), It was resolved by using (in) instead, like
this (which works):

(in (list 'ruby "projects/rss-reader/htmldecode.rb" Str) (till))

Why is this happening and how can it be resolved, any ideas?

Could the problem be that xml is outputting unchunked to pipe and the
http server chokes on this?

/Henrik
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to