• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Error while creating blank XML document

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to make a XML using code mentioned below. But it is giving me [rootTransaction:null] at line 20.



Please let me know what could be the possible reason.

Thanks in advance.

Akhil Kashyap
 
Bartender
Posts: 2657
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to our XML and Related Technologies forum.
 
Marshal
Posts: 24963
61
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean line 22, don't you? Line 20 would output an error message. Anyway that's because the toString() method of a DOM Node always prints the "value" of the Node. If you look at the documentation for Node you will see that the "value" of an Element node is always null.

Did you expect something else? If so, what?
 
Akhil Kashyap
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Yes I mean line 22.

As the same code is working fine in another project and the output of line 22 there is " <rootTransaction />".

The comparison made me to believe there is some thing wrong in lines 15 to 18.

Regards,

Akhil.
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!