- Platform information:
- Hardware: Virtual with 4gb ram
- OS: Windows 2008R2 x 64
- Java Runtime Environment:1.8.161
- openHAB version:2.2
I would like to include News with my weather. I have created item:
String RSS_Test3 "TestText [%1:$s]" {http="<[http://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml:6000:XSLT(Test.xsl)]"}
My XLSM Transform:
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output indent="no" method="text" encoding="UTF-8" standalone="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:for-each select="//rss/channel/item">
<xsl:text><b>Title:</b> </xsl:text>
<xsl:value-of select="title"/>
<xsl:text><br /><b>Description:</b> </xsl:text>
<xsl:value-of select="description"/>
<xsl:text><br /><br /><br /></xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
This successfully gets all of the XML items from this RSS news feed. As you may be able to guess, I would like to get this feed in an HTML format. In that way, it would be all nice and pretty (and easily read.) I have gone around and around, but nothing I have done gives any HTML output. I use HABPanel with a template:
<div ng-init="ServerPath='http://localhost:8080/static'; IconSet='Moon'">
<link rel="stylesheet" type="text/css" href="{{ServerPath}}/layouts/default.css" />
</div>
<div>
<h2>News</h2>
{{itemValue('RSS_Test3')}}
</div>
Everything I have tried results in the same thing. Unformatted block of text. I don’t use the built in RSS feed because it only gives 1 item – the latest. Any hints would be most welcome. Thanks!
Title:Russia-Trump inquiry: Russians charged over US 2016 election tampering Description:The named Russians are indicted along with three Russian companies by special counsel Robert Mueller. Title:Florida school shooting: FBI mishandled tip on gunman’s ‘desire to kill’ Description:US Attorney General Jeff Sessions has ordered a review the bureau’s processes after the misstep. Title:Mitt Romney launches Utah Senate campaign with dig at Trump Description:The ex-presidential nominee laments Washington is sending “a message of exclusion” to immigrants. Title:White House refuses to release photo of Trump gun law repeal Description:Despite repeated media requests, the image of Mr Trump revoking a gun control law stays under wraps. Title:How a US grandmother foiled an alleged school shooting plot Description:When a Washington state gran found her grandson’s troubling journal entries, she called the police. Title:New York ex-teacher and twin arrested for bomb-making Description:The city’s police believe an ex-teacher and his brother paid students to handle gunpowder. Title:Trump-Russia: Steve Bannon questioned in Mueller inquiry Description:Steve Bannon, a former top adviser to Donald Trump, reportedly spent 20 hours with investigators. Title:Florida shooting: ‘We watched gunman kill our friends’ Description:Two students who hid under a desk as a gunman fired at their classmates describe their ordeal. Title:Immigration effort to protect Dreamers collapses in US Senate Description:The Senate falls short of the 60 votes needed to pass any of four proposals brought to the floor. Title:Winter Olympics: Fans leap to Nathan Chen’s defence Description:After Nathan Chen’s uncharacteristic tumble in an Olympic skating event, fans jumped to his rescue Title:Winter Olympics: Mikaela Shiffrin fourth in slalom as Frida Hansdotter wins Description:Sweden’s Frida Hansdotter wins the women’s slalom as favourite Mikaela Shiffrin misses out on a second gold in Pyeongchang. Title:Jennifer Aniston and Justin Theroux announce separation Description:The couple, who were married in 2015, say the decision is mutual and was “lovingly made”. Title:Texas couple propose at same moment Description:The moment Tori and Berkley popped the question at the same time has gone viral. Title:Transgender woman breastfeeds baby in first recorded case, study says Description:She was able to produce enough milk to be the baby’s only food source for the first six weeks, a study says. Title:Toronto fire fighter who went missing in NY found in California Description:Police say Danny Filippidis can’t remember much about how he went from a ski hill to Sacramento. Title:Florida shooting: Who are the victims? Description:Football coach Aaron Feis, who was shot while shielding pupils, was among those killed on Wednesday. Title:Nikolas Cruz: Depressed loner ‘crazy about guns’ Description:Students at the school described Nikolas Cruz, 19, as an “outcast” known for making threats. Title:Florida shooting: Senators singled out over gun lobby funds Description:Politicians sending condolences to Florida victims criticised by screenwriter Bess Kalb. Title:‘Guns and survivalists, but no school until I was 17’ Description:Tara’s fundamentalist family in rural Idaho would not let her go to school, but she got a PhD from Cambridge. Title:How pastry chef training helps people with disabilities Description:Unemployment for disabled adults is double the US average but a bakery in Maryland is trying to change that. Title:Chloe Kim: Why do some people get ‘hangry’? Description:Kim was ‘hangry’ before winning a Winter Olympic gold medal. Why does hunger make people angry? Title:US Judge dismisses Taylor Swift ‘haters’ case as too ‘banal’ Description:The phrase “haters gonna hate” cannot be copyrighted, rules the judge in a case against Taylor Swift.