• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem in getting Node value:

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
<AUD_EVENT_TXT>Check Authorizations Success ala <?name value?> </AUD_EVENT_TXT>

I am using Xpath to point and for getting the particular node and at the sametime i am facing problem in getting the node value for above mentioned node.

can anyone suggest me how to get the node value for the above node?

thanks in advance
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect you are making a common mistake about Node values. The Element "AUD_EVENT_TXT" has a Text Node as a child.

Element nodes return null from a call to getNodeValue() - Text nodes return the text I suspect you are looking for.

The JavaDocs for the org.w3c.dom.Node interface have a marvelous table describing what all the different kinds of XML DOM Node return for value, name, etc.

Anybody working with XML in Java needs to get very familiar with this table.

Bill
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic