Disregarding the non-WATIR issues of having tags in the first place, or requesting unique attributes from your developers (or yourself), you can always access an element via its parent elements, or by index.
For example:
Text
@browser.div(:name => "content").span(:index => 1)
#this is the first span element inside this div
You can work through however many unique elements you need to before reaching the child span element, without using Xpath. Of course, you only need one unique parent element to reach that specific child element, and you work down from that to the child.
div(:how => what).table(:how => what).td(:how => what).span(:how => what).text
Another example, assuming it is the nth span on the page:
@browser.span(:index => n)
The by-index approach is very brittle and prone to breaking when any update is made to the page, however.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…