At 06.40 09/08/2001 -0700, you wrote:
>Hi,
>
>This is probably considered a newbie question, but I'd
>really appreciate any help I can get.
>
>I don't know how to extract the values between XML
>tags.  I can see that getNodeValue doesn't do the
>trick, and I remember reading in the mail archive that
>it always returns null for element tags.   Is there a
>way to do this?

Hi Nicole,
You need to walk down to the children of the element node and invoke 
getNodeValue on the text node. Something like that (if you know that you 
can have only simple string - no child tags - between the XML tags):

             DOM_Node child = element.getFirstChild();
             while( child != 0)
             {
                 if(child.getNodeType()==DOM_Node::TEXT_NODE)
                     return child.getNodeValue();
                 child = child.getNextSibling();
             }

Alberto

-------------------------------
Alberto Massari
eXcelon Corp.
http://www.StylusStudio.com


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

Reply via email to