Xpath Can't Create List When Using normalize-space

I was trying to help another KNIMER with some web scraping and ran into an Xpath problem. The original thread is How to pull data from a website that does not have an API? - #3 by rfeigel

This problem seems generic so I thought I’d start a new thread.
Here’s the workflow:
Simple Web Scraper.knwf (147.3 KB)
The xml is not very well formed. It consists of monthly data with an extra flag for the current year. There is a lot of extra white space in the value field. If I try to remove the white space the Xpath query won’t allow a list, only a single entry which gets stuck on the first data field. Here are a series of screenshots which hopefully will clarify the problem. I’ve done quite a bit of searching and haven’t found any help.


1 Like

Hi @rfeigel ,
The situation you mentioned also exists in 5.2.5. The error prompt is that the underlying Java package reports an error. Here, it is not known whether it is caused by incorrect invocation of the package or there is a problem with the underlying package.


I found a way with less resistance. :grinning: The processing of the string is not handled in “xpath”, but is processed externally using the “String Clean” node.



@tomljh Thanks. Could you post your revised workflow please. The screenshot is very hard to read.

Simple Web Scraper 2.knwf (10.6 KB)


Perfect. Thank you very much.

1 Like

Thanks everyone for the help. The issue arose from my query that @rfeigel was trying to resolve.

1 Like

@rfeigel is an enthusiastic and perfection-pursuing person. :+1:Thank you for participating in the discussion. Under normal circumstances, I have never thought that an HTML page could be parsed as an XML document. I have also gained a lot.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.