File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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.....
It's not a secret anymore!