aspose file tools*
The moose likes XML and Related Technologies and the fly likes Copying one node to another node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Copying one node to another node" Watch "Copying one node to another node" New topic
Author

Copying one node to another node

Preeti Sikri
Ranch Hand

Joined: Mar 01, 2001
Posts: 30
Hi Friends
Hi
I have around 100 xml files in which my developer by mistake inserted Some text in wrong node(element).
Now I wanna make java program in which I want to cut that text from that node and want to paste it in another node.
I have wrote some cod efor that but it is giving me exception in
specific code :
Exception is "java.lang.NullPointerException"
Code is :


Please let me where i'm going wrong .
Thanks
Preeti
padmaja bhosale
Greenhorn

Joined: Jul 31, 2001
Posts: 3
Hi Preeti ,
Can you post the exact Exception i.e. print stack of the exception . That will help to solv this problem.
Cheers,
Paddy
Preeti Sikri
Ranch Hand

Joined: Mar 01, 2001
Posts: 30
The full exception is like this
java.lang.NullPointerException
at parser.grrText.swapNodes(grrText.java:112)
at parser.grrText.checkRpt(grrText.java:91)
at parser.grrText.fileToDom(grrText.java:66)
at parser.grrText.process(grrText.java:57)
at parser.grrText.<init>(grrText.java:40)
at parser.grrText.main(grrText.java:44)
Exception in thread "main"

Please help me.
Any help would be great.
Thanks.
 
wood burning stoves
 
subject: Copying one node to another node