Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query about jDOM.

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jDOM to generate XML file. I have <TEXT> element in XMl file. Now when I don�t have any value for <TEXT>, the generated element contains <TEXT />. But instead of that I required <TEXT></TEXT>. How to achieve this?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the generated element contains <TEXT />. But instead of that I required <TEXT></TEXT>.


Either form is good legal XML for an empty element and will be handled propertly by XML parsers.

Why are you so sure that you require the second form?

Bill
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is that the program that generate is using parser, but program that read xml does not use the parser - it's other party who is reading it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic