With a lot of searching and using of my little knowledge, I've figured out of to do this.
I've deleted ItemLink and now using Items.
Then I've replaced the following line:
SendItems += ItemLink.childNodes[0].childNodes[i].text + "\n";
to
SendItems += ItemLink.childNodes[i].getAttribute("id") + "\n";
So now my code looks like this:
code:
var SendItems = "";
var Items = XMLmsg.selectSingleNode("myxmldocument//items");
if(Items != null)
{
for(var i = 0; i < Items.childNodes.length; i++)
{
Quality = Items.childNodes[i].childNodes[1].text; // Quality
SendItems += "[b]";
switch(Quality) // Name
{
case "0":
SendItems += "[c=#9d9d9d]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "1":
SendItems += "[c=#000000]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "2":
SendItems += "[c=#1eff00]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "3":
SendItems += "[c=#0070dd]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "4":
SendItems += "[c=#a335ee]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "5":
SendItems += "[c=#ff8000]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
case "6":
SendItems += "[c=#e6cc80]" + Items.childNodes[i].childNodes[0].text + "[/c] ";
break;
}
SendItems += "[/b]";
SendItems += "\n";
SendItems += SendItems += Items.childNodes[i].getAttribute("id") + "\n";
}