1 | <a> |
U can probably use the following xpath:
count(//b[normalize-space(text())="col_d"]/preceding-sibling::b)+1
But it doesn't work for me in nokogiri, so what i did was:
1 | doc = Nokogiri::XML(above_xml_string) |
That's all !!
1 | <a> |
count(//b[normalize-space(text())="col_d"]/preceding-sibling::b)+1
1 | doc = Nokogiri::XML(above_xml_string) |
No comments:
Post a Comment