• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

special characs lead to error in XML(jdom) :(

 
Robert Jaeger
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am manipulating passwords with the java.security Package before saving them in XML. Unfortunately JDOM reports an error while I try to set the password in XML. The reason are the password´┐Żs special characters created by the java.security Package.

How can I force JDOM to store the password?
It would be great if someone has an idea

Robert.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could apply Base64 encoding on the password before stuffing it into the XML document (and of course decode it when reading).
 
Robert Jaeger
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, finally I made it with a "byte to hex"-transformation.
However, thanky for your suggestion!
Robert
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic