content of xml <link> tag not extracted?
anneb opened this issue · 1 comments
anneb commented
This RSS Feed returns a set of <item></item> elements. Every <item> element has subelements like <title>, <description> and <link>
I am able to extract the content of <title> and <description> but not from <link>
Am I missing something? Is this a feature or a bug? <link> is also a valid HTML element. Maybe osmosis is confusing xml with html?
I am using the following code:
const osmosis = require('osmosis');
const baseUrl = 'https://zoek.officielebekendmakingen.nl/rss?q=(available%3e=2020-01-14%20and%20available%3c=2020-01-14)and(((publicationName==%22Tractatenblad%22))or((publicationName==%22Staatsblad%22))or((publicationName==%22Staatscourant%22))or((publicationName==%22Gemeenteblad%22))or((publicationName==%22Provinciaal%20blad%22))or((publicationName==%22Waterschapsblad%22))or((publicationName==%22Blad%20gemeenschappelijke%20regeling%22)))';
let result = [];
osmosis
.get(baseUrl)
.find('item')
.set({
link: 'link',
title: 'title',
summary: 'description'
})
.data(res=>result.push(res))
.done(()=>console.log(result));
The output of the above code shows titles and summaries but all links are empty.