Joerg Heinicke wrote:

On 01.04.2004 19:51, JD Daniels wrote:

This is a sample of what is being loaded into document:
<InventoryItem>
<id>4</id>
<inventoryId>11033</inventoryId>
<inventoryType>2</inventoryType>
<description>100BBL Skidded pop tank, c/w tone tone paint, thie</description>
<initialRate/>
<monthRate>300.00</monthRate>
<dayRate>15.00</dayRate>
</InventoryItem>


document.getFirstChild().getLastChild().nodeValue = ""
document.getFirstChild().nodeName = InventoryItem
document.getFirstChild().nodeName = InventoryItem


Should be something like this:

var rootNode = document.getFirstChild();
var child = rootNode.getFirstChild();

do {
    if (child.getNodeName().equals("description")) {
        break;
    }
    child = child.getNextSibling();
} while (child);

var value = child.getNodeValue();


I added: do { print(child.getNodeName()); print(child.getNodeValue());

it echoes:

#text


#text



#text



#text



#text



id null #text


#text



inventoryId null #text



#text


comments null #text



#text


inventoryType null #text



#text


description null



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to