Hi,
finally I managed to download and save a xml file to my disk. Now I would like to find a specific element in this xml file. I managed to open it in QML using JS (how to) but I am just not able to access the content of the nodes. What is the right syntax to access these information from the for loop?
<xml>
<termin type="1">
<datum>1449939600</datum>
<art>BA</art>
<thema>Feier</thema>
<anmerkung/>
</termin>
<termin type="2">
<datum>1450458000</datum>
<art>Supervision</art>
<thema>Supervision</thema>
<anmerkung/>
</termin>
</xml>
<xml>
<termin type="1">
<datum>1449939600</datum>
<art>BA</art>
<thema>Feier</thema>
<anmerkung/>
</termin>
<termin type="2">
<datum>1450458000</datum>
<art>Supervision</art>
<thema>Supervision</thema>
<anmerkung/>
</termin>
</xml>
To copy to clipboard, switch view to plain text mode
For example console.log(a[ii].getElementsByTagName("datum")[0].childNodes[0].nodeValue); says TypeError: Cannot call method 'getElementsByTagName' of undefined
What am I doing wrong?
Bookmarks