This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes help!Urgent,my assignment..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "help!Urgent,my assignment....." Watch "help!Urgent,my assignment....." New topic

help!Urgent,my assignment.....

Mellihoney Michael
Ranch Hand

Joined: Nov 27, 2002
Posts: 124

my servlet program

the result is:

But I want to read all ChildNode's NodeValue instead of null.
for example,<author>Michael</author>,so The child node is : author and the node value is: "Michael" instead of "null"...
How can I achieve this?
Thanks in advance...

a beginner in java
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
We're not really here to do your assignments for you, but here's a hint.
if (n.getNodeName()!=null&&!n.getNodeName().equals("#text")){
Ask yourself what will be the "node name" of the values you are trying to find. When you have thought about this, consider why this line might not be quite right.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Mellihoney Michael
Ranch Hand

Joined: Nov 27, 2002
Posts: 124
many thanks...
I agree. Here's the link:
subject: help!Urgent,my assignment.....
jQuery in Action, 3rd edition