Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
XML feed format question

 

 


ColinW-O
User

Oct 14, 2009, 10:04 AM

Post #1 of 6 (1893 views)
Shortcut
XML feed format question Can't Post

Hi guys,

Ok, as you might or might not know, I have an iPhone app which feeds off my AM2 articles.

I created different pub rules in XML output and I have something that I need to fix but can't figure out how because a) either the feed doesn't load or b) stays the same.

So, here's what I have.

In the Article Row template cell I have:


Code
      <item> 
<title>$article.title:textOnly:htmlEncoded$</title>
<link>$published.articleiphonexml.url$</link>
<pubDate>$article.date:format(www, dd MMM yyyy HH:mm:ss)$ EST</pubDate>
<description>$article.content:textOnly:htmlEncoded:maxWords(20)$...</description>
<guid isPermaLink="true">$published.articleiphonexml.url$</guid>
</item>


That displays the headline and then the first 20 words of the article content as the preview.

The way it's set like that, I get the HTML format so if I skip a line before the first 20 words, it's displayed.

I don't want that. I need the first 20 words "unformatted" so to speak so it all displays in one nice paragraph.

What's the correct tag to use? I'm attaching a screenshot to show you how it's displayed right now.

Thanks.
Attachments: IMG_0106.PNG (64.9 KB)


Donna
Staff / Moderator


Oct 15, 2009, 12:31 PM

Post #2 of 6 (1886 views)
Shortcut
Re: [ColinW-O] XML feed format question [In reply to] Can't Post

Hi Colin!

It looks like you're already using the "text only" modifier which should strip out any HTML. Can you send me a link to the page you're viewing, or view the source and see what exactly is coming up there?

Donna

--
support@interactivetools.com


ColinW-O
User

Oct 15, 2009, 12:50 PM

Post #3 of 6 (1884 views)
Shortcut
Re: [Donna] XML feed format question [In reply to] Can't Post

Well it's not technically a page. The XML file is called from my iPhone App which is, well, only available on iPhone :)

I thought the text only tag would strip all the HTML out that's why I used that but I guess it doesn't work for XML?

If you load the XML file for example at


Code
http://www.wrestling-online.com/news/iphonewwe.xml


and see the source code of that and scroll down or look for "Melina" there are a couple of stories like it that in the description tag it also skips a line.


Donna
Staff / Moderator


Oct 15, 2009, 3:37 PM

Post #4 of 6 (1882 views)
Shortcut
Re: [ColinW-O] XML feed format question [In reply to] Can't Post

Hi Colin,

Hmm. Well, if you view the source of your XML file, it is stripping the HTML out. It's just got a regular linebreak, but it looks like your iPhone app is displaying the linebreak as is, even without any HTML.

Since there's nothing to strip (other than linebreaks) I can't think of any way that Article Manager would be able to strip it. Would it instead be possible to get the iPhone app to ignore linebreaks?

Donna

--
support@interactivetools.com


ColinW-O
User

Oct 18, 2009, 3:20 AM

Post #5 of 6 (1877 views)
Shortcut
Re: [Donna] XML feed format question [In reply to] Can't Post

I'll have to talk to the developer about that but from what he told me, the code just loads whatever the XML file shows so if there's a line break in the XML file then it will appear in the app.


Donna
Staff / Moderator


Oct 19, 2009, 1:02 PM

Post #6 of 6 (1864 views)
Shortcut
Re: [ColinW-O] XML feed format question [In reply to] Can't Post

Unfortunately, there's not much Article Manager can do about that.

You might be able to write something that would strip out linebreaks, but as HTML ignores linebreaks, there's no function in HTML (or Article Manager) to do this by default.

Donna

--
support@interactivetools.com