('binary' encoding is not supported, stored as-is)
You are dealing with an Element Node that has a text value. The getNodeValue() method on this element returns null, as per specification. However, the child Node of Element in question -- if there is indeed text content -- is going to be a Text Node. The value of this Text Node is what you are after. To replicate getTextContent(), you need something like: NodeList matchingNodes = document.getElementsByTagName(nodeName); Node matchingNode = matchingNodes.item(whichOne); // The node we've found is an Element - get its child with text value // return matchingNode.getChildNodes().item(0).getNodeValue(); // of course, you'd check if the child node is there indeed, and if it is text ... hope this helps, GW / http://eaiblueprint.com
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:58 GMT