I have a working RSS feed that places points onto a Google map using an RSS feed and xsl. My problem is i would like to merge at least two RSS feeds into one that can then be styled by the xsl and output to the google map.
Here is my current code
Dim rssFeedLoc As String = "http://examplesyndicationlink.uk/organisations/buildings/postcode/XXXXXX.rss?apikey=XXXXXX&range=12"
Dim xDoc As XPathDocument = New XPathDocument(rssFeedLoc)
Dim xNav As XPathNavigator = xDoc.CreateNavigator()
dlFindXMLResults.XPathNavigator = xNav
dlFindXMLResults.TransformSource = "/xsl/hello.xsl"
I would like to add the following feeds
Dim rssFeedLoc2 As String = "http://examplesyndicationlink.uk/organisations/buildings/postcode/XXXXXX.rss?apikey=XXXXXX&range=12&page2"
Dim rssFeedLoc3 As String = "http://examplesyndicationlink.uk/organisations/buildings/postcode/XXXXXX.rss?apikey=XXXXXX&range=12&page3"
Is there a way i can merge the 3 feeds into one? Would this require creating a temporary file on the server?
EDIT: I suppose when i say 'merge' i mean join together, the RSS feed is restricted to show only 10 results per page, i would like to join all the results from the 3 pages together? There would also be no duplicates as the pages are just a continuation of the results.
Instead of using XSL to do this have you considered Yahoo Pipes? That will allow you to combine as many RSS feeds as you like into one feed.
Related
I am not an access professional but use it to help me make my job easier so please excuse my terminology. I will try and explain as best I can.
I need to create a data base that stores the contact and other information about vendors that we use and specifically the services and the countries that they can provide services in but some of these vendors can provide services in multiple countries and can also provide multiple services. So would prefer to be able to use a list with multi-valued entries for ease of use and to prevent having to duplicate the vendor entries for deferment countries and services. (This i can do)
Then i need to create a search form that performs searches on key words, ether the country name, the service or the vendors name. I did this based on the following code i got from the internet:
Private Sub Command9_Click()
Dim strsearch As String
Dim strText As String
strText = Me.TxtSearch.Value
strsearch = "SELECT * from Query1 where ((Decipline Like ""*" & strText & "*"") or (Country_OO Like ""*" & strText & "*""))"
Me.RecordSource = strsearch
End Sub
(The search part in itself works fine)
The problem: When I try to use the search with the multi-valued list
box I get the following error: Error 3831 the multi-valued 'Country_OO'
cannot be used in a WHERE or HAVING clause.
Debug.Print strsearch SELECT * from Query1 where ((Decipline Like "a") or (Country_OO Like "a"))
I know most of you on here are not fans of the Multi-valued list but in this case it would work great. Is there a way around this or and alternative that you can suggest? Maybe a way that i can select the from a list then it adds the txt only to the master file?
Taking your (good!) question title to Google leads directly here, which suggests that
WHERE Country_OO.Value Like "*a*"
should work.
But it would really be better to not use multi-valued fields. Ever.
I have a java servlet that works as a REST service. My data is delivered through a categorized view with 3 categorized columns.
I create a view navigator using the View.createViewNavFromCategory("2014\43") where the category specified adheres to the first two categorized columns.
2014 = year and 43 = week number, which means there can be up to 53 second column categories.
My categorized columns are sorted decending. For some strange reason I found that all columns had to be sorted the same way (undocumented).
My code:
String viewCategory = "";
if (isYearSpecified) viewCategory = <year parameter>;
if (isWeekSpecified) viewCategory = viewCategory + "\\" + <week parameter>;
ViewNavigator nav = lookupView.createViewNavFromCategory(viewCategory);
//and set the size of the preloading cache:
nav.setBufferMaxEntries(numCacheEntries);
// Initialize list of JSON income objects
List prognosisJSON = new ArrayList();
//and then traverse the view:
ViewEntry currEntry = nav.getFirst();
This works as a charm until I specify a week lower than 13. If using category "2014\12", "2014\11" and lower the viewEntry returns null when trying to access the first entry in the navigator.
I should perhaps add that my view contains 2102 documents in categories before the one that fails (if there is an undocumented max limit).
What can I do to prevent this?
I suspect you're hitting this problem http://www.intec.co.uk/apparent-java-getalldocumentsbykey-getallentriesbykey-bug/. The fact it works in LotusScript and the keys you're looking for sound suspicious. To completely confirm it, it should also fail in a Java agent.
The latest I had was that this was planned for 9.0.2.
If so, in the mean time, changing the columns to text instead of number will solve the problem.
I am new to the HtmlAgilityPack and its a bit unclear for me how it exactly works. Lets say when something like this piece of code is written
Dim url1 As String = "http://www.bing.com/search?q=Verizon
Dim hw As New HtmlWeb()
Dim doc As HtmlDocument = hw.Load(url1)
For Each link As HtmlNode In doc.DocumentNode.SelectNodes("//a[#href]")
Dim att As HtmlAttribute = link.Attributes("href")
Response.Write(att.Value)
Next
So when the SelectNodes is //a[#href] does that mean that it will only look at ahref tags?
If so how can I make it consider other tags in within the loop like <li>, <h3>, <div>.
Is it correct like //li[#class='wrap']|//div[#class='last'] ??
How can the data between those tags be fetched and presented.
One other issue is that lets say I need to scrape a telephone number from that url, the number might be unavailable or might not be in any of the tags defined. Is there any reliable method that I can work on in order to obtain a telephone number to a relative search term? Any suggestions or thoughts?
Indeed, the current xpath looks at anchor tags that have a href parameter. I suggest you read up on xpath syntax (for instance at http://www.w3schools.com/xpath/xpath_syntax.asp)
To select other nodes you need to change the xpath to select those tags, for instance:
doc.DocumentNode.SelectNodes("//li")
to get all li nodes etc.
The data in the tags can be reached using the InnerHtml of the selected document nodes (link.InnerHtml in your example)
Automatically scraping telephone numbers is a real pain, every country uses different lengths and there are many different formats to write down a number: +12(0)3456 +123456 00123456 +12(0)34-56 are all the same valid phone number... See Check if there is phone number in string C# for a simple sollution
GL&HF!
I'm using YQL to retrieve an RSS feed using javascript (as json), for example i use the following query:
select * from rss where url = "http://feeds2.feedburner.com/ajaxian"
The response contains the feed items, already parsed as json and everything is cool so far.
Now, I also want to get the title of the entire feed (not the title of a specific item) - but it's not a part of the result (even though the original XML feed contains it).
There is the possibility of querying the original XML itself. for example:
select channel.title from xml where url = "http://feeds2.feedburner.com/ajaxian"
and it indeed returns the feed title for that specific RSS, but that query is only valid for a RSS 2.0 formatted feeds, which stores it under rss\channel\title.
What about atom feeds which store the title under feed\title ?
What about other formats?
My question is - is there any generic way to request the feed's title through YQL? maybe somehow along with the feed itself?
thanks,
You can use the feednormalizer table to convert the feed (regardless of its format) into one of the standard formats, then grab the title from the proper node for that format.
To take the Ajaxian feed, "normalize" it as Atom and get the feed title, the query would look like:
SELECT title
FROM feednormalizer
WHERE output="atom_1.0" AND url="http://feeds2.feedburner.com/ajaxian"
(Try this in the YQL console)
There are also other tables that you can use like feed, rss and atom.
Regarding your follow up question of how to find data tables:
Go to the YQL console, make sure that the Community Tables are loaded (should already be the case with this link) and then just type in the search box on the right hand side what you are looking for. Often you can find something useful.
i am trying to load this xml file into the dropdownlist:
http://sites.google.com/site/shadchanproject/Home/lots1.xml
i want to only load the a7190, a7193 etc... (there are only three of them i believe)
please help!
i am doing this in asp.net
Hmm, I'm having issues downloading the file.
But in general, if you can download the XML file and create an XSD file based off this (there are several XSD generators out there), you can then create a DataSet object that will read the XML data into a DataTable.
From there, you can create a DataView, filter out the other items so that only the desired elements remain, and bind the DataView to the drop down list.
EDIT: Well, I looked and its simpler than that. You should be able to read the XML file straight in. You won't have a strongly typed table, but you can do this:
Dim dsStuff As New DataSet()
dsStuff.ReadXml("PathToFile")
Dim dvStuff As New DataView(dsStuff.Tables(0))
dvStuff.Sort = "Name = 'FilteredName'"
ddlStuff.DataSource = dvStuff
ddlStuff.DataTextField = "Name"
ddlStuff.DataValueField = "ID"
ddlStuff.DataBind()
Adjust the filter criteria accordingly.