+1
Fixed

XPath syntax issue in datasource query

storycode 8 years ago updated 8 years ago 5
You probably need to note in the documentation that when using xpath syntax in the datasource 'query' attribute that operators such as '' need to be entered using the html entity, i.e. ', etc, otherwise the wire fails with an error.
Thanks for bringing this to our attention. I will check with the team and make sure there isn't a way to make this work before we add it to the docs.
This is a quote alignment rule set by the xml parser for any xml attribute and is not limited to the xpath syntax. If you align single and double quotes appropriately there is no need to use html encoding.

bad:
query="//name[text()="bob"]"

The xml parser thinks the text for the query attribute ends after the =

good:
query="//name[text()='bob']"
or
query='//name[text()="bob"]'
No, my report was actually about using the less than and greater than symbols - which must have been filtered out of my post by your support software.

As far as I can see you have to use the html representations of the greater and less than symbols in xpath syntax.
@storycode

Could you post an example of your query value on this topic using the <code> wrapper?

The "some html allowed" link above the text field can guide you in displaying code within a getsatisfaction topic
Sorry about that, did not realize there were html formatting options available.

Here is an example of what I mean:



<datasource name="feedgrp" providertype="xml" query="//item[position() < last() - 1 and position() > 3]" source="http://feeds.arstechnica.com/arstechnica/askars?format=xml" />


Either the less than or greater than operator (or both, not sure which it is) cause an error in the conduit when the above is used in the wire. So I found it needs to be written as follows:



<datasource name="feedgrp" providertype="xml" query="//item[position() &lt; last() - 1 and position() &gt; 3]" source="http://feeds.arstechnica.com/arstechnica/askars?format=xml" />