Hi everybody, Here is my problem, i have a xml file which contains a tag like <name>michea\nl</name> when i access this through a java program and forming a String for that name tag value, that '\n' is not taken into one character. It has been considered as two char '\' & 'n' and so the newline escape sequence is not working. i use UTF-8 as encoding in XML. Thanks & Regards Micheal
Have you tried embedding the value inside a CDATA?
When you parse the xml it should come back with a linefeed in it. The problem you're having is \n, is in fact 2 characters and treated as such L
I have no java certifications. This makes me a bad programmer. Ignore my post.
Joined: Nov 25, 2002
Hi, As per my understanding,CDATA if we give,the XML parser doesn't check for any special characters. Even then, while taking, it will take \n as two characters. Anyway i have other solution for my problem,but i wanted to know is, whether can i do something like, changing the encoding so that the two characters be considered as one.