Hi all,
i used JDOM to create XML file.
first, i get data from database and create Document object. in some data i
have quotas, so it makes replacment in content of elements. for example:
if i have "Hi" in database, i will have "Hi&quo t; in content of
element. And it is ok, because in xml does not exist ", at least i think
that.
After it i want to make convert from document to string. I used
XMLOutputter serializer = new XMLOutputter();
String output = serializer.outp utString(docume nt);
now, when i look what's happened with "Hi&quo t; i found following
string
"Hi&am p;quot;
it makes conversion of & again, and that is not ok.
has someone similiar problem? or do you know how to solve it?
i can make parsing of string again and cut what is wrong, but is it possible
to set something without that?
thanks in advance.
i used JDOM to create XML file.
first, i get data from database and create Document object. in some data i
have quotas, so it makes replacment in content of elements. for example:
if i have "Hi" in database, i will have "Hi&quo t; in content of
element. And it is ok, because in xml does not exist ", at least i think
that.
After it i want to make convert from document to string. I used
XMLOutputter serializer = new XMLOutputter();
String output = serializer.outp utString(docume nt);
now, when i look what's happened with "Hi&quo t; i found following
string
"Hi&am p;quot;
it makes conversion of & again, and that is not ok.
has someone similiar problem? or do you know how to solve it?
i can make parsing of string again and cut what is wrong, but is it possible
to set something without that?
thanks in advance.
Comment