File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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
Sheriff

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 frankcarver.me ~ 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: http://aspose.com/file-tools
 
subject: help!Urgent,my assignment.....