The name is more complex than it should be, here is the problem request.
SELECT * FROM query.multi WHERE queries=" SELECT * FROM html WHERE url='http://www.stumbleupon.com/url/http://www.guildwars2.com' AND xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'; SELECT * FROM xml WHERE url='http://services.digg.com/1.0/endpoint?method=story.getAll&link=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://api.tweetmeme.com/url_info.json?url=http://www.guildwars2.com'; SELECT * FROM xml WHERE url='http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://www.reddit.com/button_info.json?url=http://www.guildwars2.com'"
In particular, this line,
xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'
This is problematic due to quoting, I have to put them into three levels, and I have run out of quote symbols. I tried the following options without success:
//no attribute quoting xpath='//li[@class=listLi]/div[@class=views]/a/span' //try to quote attribute w/ backslash & single quote xpath='//li[@class=\'listLi\']/div[@class=\'views\']/a/span' //try to quote attribute w/ backslash & double quote xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span' //try to quote attribute with double single quotes, like SQL xpath='//li[@class=''listLi'']/div[@class=''views'']/a/span' //try to quote attribute with double double quotes, like SQL xpath='//li[@class=""listLi""]/div[@class=""views""]/a/span' //try to quote attribute with quote entities xpath='//li[@class="listLi"]/div[@class="views"]/a/span' //try to surround XPath with backslash & double quote xpath=\"//li[@class='listLi']/div[@class='views']/a/span\" //try to surround XPath with double double quote xpath=""//li[@class='listLi']/div[@class='views']/a/span""
All without success.
I donβt see much in avoiding XPath strings, but everything I found seems to depend on the use of concat (which will not help, because it is neither "neither" nor "accessible"), nor html entities. the attributes do not throw an error, but fail because it is not the real XPath line that I need.
I don't see anything in YQL docs about how to handle escaping. I know how this is a cross-case, but I hoped that they would have some kind of elusive guide.
Tivac source share