# 4 new parameters in the XML, I can not read them

**URL:** <https://forum.kirupa.com/t/4-new-parameters-in-the-xml-i-can-not-read-them/313321>\
**Category:** Uncategorized\
**Created:** [August 25, 2010, 10:01pm UTC](https://forum.kirupa.com/t/4-new-parameters-in-the-xml-i-can-not-read-them/313321 "2010-08-25T22:01:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RicardoLimaJR](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@RicardoLimaJR](https://forum.kirupa.com/u/RicardoLimaJR)\
**Post date:** [August 25, 2010, 10:01pm UTC](https://forum.kirupa.com/t/4-new-parameters-in-the-xml-i-can-not-read-them/313321/1 "2010-08-25T22:01:10Z")

</div>

I think I’m in big trouble.

I am reading a xml, and it is working perfect.

But entered 4 new parameters in the XML,\<subtotal\>,\<currency\>,\<TotalWeight\> and \<WeightUnit\>, and I can not read them.

XML:

```auto

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<cart>
    <subtotal>999999,99</subtotal>
    <currency>R$</currency>
    <TotalWeight>133,23</TotalWeight>
    <WeightUnit>kg</WeightUnit>
    <item>
        <image>ModStetsomM.jpg</image>
        <prod>Módulo de Potência 2 Canais CL50</prod>
   <qty>2</qty>
        <price>159,59</price>
    </item>
</cart>

```

AS:

```auto

function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        item = [];
        valor = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
            item* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
            valor* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
        }
        firstImage();
    } else {
        content = "não carregou!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
        preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        preloader._visible = false;
        if (picture._alpha<100) {
            picture._alpha += 10;
        }
    }
};
function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 0;
        picture.loadMovie(image[0], 1);
        desc_txt.text = description[0];
        preco_txt.text = valor[0];
        item_txt.text = item[0];
        picture_num();
        
        //ValorTotal_txt.text;
        
    }
}
function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
}

```

Does anyone know how I can solve?
