Translator Framework issue
Consider Following markup:
<div>
<span>A</span>
B
</div>
I want fetch "B" using translator framework.
I tried followings all failed:
date : FW.Xpath("//div/text()") // returns null
date : FW.Xpath("//div/").text() // returns AB
How can I fetch just 'B'?
<div>
<span>A</span>
B
</div>
I want fetch "B" using translator framework.
I tried followings all failed:
date : FW.Xpath("//div/text()") // returns null
date : FW.Xpath("//div/").text() // returns AB
How can I fetch just 'B'?
item.publisher = (magic incantation for A)
var tmp = item.publisher;
item.publisher = (magic incantation for AB)
item.publisher = item.publisher.slice(tmp.length);
More or less.
Without it we can easily use "//div/text()" xpath for fetching B
FW.Xpath("//div/text()").text()
Xpath() returns a node, so you need to get the text() regardless of what you put in the xpath.
it returns null