Xpath : The context can not be null when the operation is context-dependent.

I am getting this error in the Xpath Node

Execute failed: javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: The context can not be null when the operation is context-dependent.

I tried everything, filtering rows, Filtering columns, only finding 1 webpage but it is just throwing this error again and again. It was working before I made few changes for string manipulation. I am out of ideas how I can resolve this error.

image

I want to ideally get details from all valid pages from here.However, just to resolve the error was using only row 3 but still I am stuck at the error. I deleted all the xpath and started fresh but that is also giving me an error.

Any idea how I can fix this?

Recently_Sold.knwf (156.9 KB)

Thanks
Ankit

Hi,
The problem is that the XML document is not 100% valid. There is an xlink:href attribute, but the namespace xlink is not defined in the document. You can use a String Manipulation node with the expression

replace($Document$, "xlink:href", "href")

to fix the document, then turn it back into XML with String To XML and your XPath node will work.
Kind regards,
Alexander

2 Likes

Thanks Alexander. I will have look on this.

1 Like

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