Gossamer Forum
Quote Reply
XMLResults
I have installed the XMLResults plugin, but when I try to add "&xml_feed=1" to the search query, I don't get any output.

Any ideas?
Quote Reply
Re: [Jobu] XMLResults In reply to
Have you modified the output template?
Quote Reply
Re: [Alba] XMLResults In reply to
In Reply To:
Have you modified the output template?



Just to customize it as follows, nothing else:

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="0.91">
<channel>
<title><%site_title%></title>
<link><%build_root_url%></link>
<description>The world's largest network marketing and multi-level marketing (MLM) resource. Search and browse our directory for ideas on how to become an Internet millionaire by working from home. We are the go-to source for network marketing, MLM and direct marketing.</description>
<language>en-us</language>
<copyright>&copy; 2006 WiredBIZ Media Inc. All Rights Reserved.</copyright>
<managingEditor>links@WiredBIZ.com</managingEditor>
<webMaster>admin@WiredBIZ.com</webMaster>
<%loop link_results_loop%>
<item>
<title><%Title%></title>
<link><%URL%></link>
<description><%Description%></description>
</item>
<%endloop%>
</channel>
</rss>



Try, for example, www.WiredBIZ.com/cgi-bin/links/search.cgi?IsNew=Yes&xml_feed=1 (or whatever).

Last edited by:

Jobu: Aug 13, 2006, 7:02 AM
Quote Reply
Re: [Jobu] XMLResults In reply to
It works. But it only gives results for valid queries (try removing &xml_feed=1 from the query you use).
Quote Reply
Re: [gotze] XMLResults In reply to
In Reply To:
It works. But it only gives results for valid queries (try removing &xml_feed=1 from the query you use).


Thanks, but when I click on that link (http://www.wiredbiz.com/...nmark&xml_feed=1) I still get a blank page. Do you get the actual results?
Quote Reply
Re: [Jobu] XMLResults In reply to
Yes, I get the RSS-file with results.

Never mind what you get when you vire the page in your browser - thatīs not what feeds are meant for. Try using an aggregator. You should also use feedvalidator.org to validate your output. Note that the plugin is not producing valid output by default, but the output is "good enough" for most aggregators.
Quote Reply
Re: [gotze] XMLResults In reply to
In Reply To:
Yes, I get the RSS-file with results.

Never mind what you get when you vire the page in your browser - thatīs not what feeds are meant for. Try using an aggregator. You should also use feedvalidator.org to validate your output. Note that the plugin is not producing valid output by default, but the output is "good enough" for most aggregators.

Thanks. Is there a way for me to make it so I get the valid output?
Quote Reply
Re: [Jobu] XMLResults In reply to
The deep-level problem is that the output generated by the plugin is not "real" XML, i.e., declared as such in the http header.

As for the templated output, you should escape both Title, URL and Description, i.e., <%escape_html URL%> etc.