Two Laptop Bag*
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 Murach's Java Servlets and JSP this week in the Servlets 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.....
Similar Threads
xml JAVA
Why I can't retrieve records stored in a XMLFile correctly?
a ReadXMLFile Servlet works without my expectation...
Can anyone help?I still can't append records in xml...
session object = null?