Below is the output of alert( rd.innerHTML );
:
<ruby><rb>「わたし</rb><rt><br>watashi</rt></ruby><ruby><rb>は</rb><rt><br>wa</rt></ruby>」<Name des Sprechers><br><ruby><rb>です</rb><rt><br>desu</rt></ruby>。
I like to iterate over all those elements. I tried (among others):
var items = rd.getElementsByTagName("*");
for (var i = 0; i < items.length; i++) {
var item = items[i];
alert( item.innerHTML);
}
But for the loop above I will get
<rb>「わたし</rb><rt><br>watashi</rt>
「わたし
n watashi
- “
<rb>は</rb><rt><br>wa</rt>
は
n wa
- “
- “
<rb>です</rb><rt><br>desu</rt>
です
n desu
- “
How can I loop this HTML and also get the item 」<Name des Sprechers><br>