Hej! Detta hittade jag på www.xmlinflash.com under FAQ. Hoppas det hjälper lite iallafall!
/Dennis
This is a common problem for newbies. For example, say you have the following node:
<ournode>here’s some text</ournode>
You really have two nodes: one is <ournode> and the other is its child, a text node. Yes, that’s right. Text is stored in its own node. If ourNode.nodeName is ournode, then ourNode.firstChild.nodeValue is here’s some text. If you read that again carefully, you’ll notice that you get the value of text from a text node by using nodeValue, and you retrieve the name of an element node by using nodeName.