wood burning stoves
The moose likes XML and Related Technologies and the fly likes Problem is Writing XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Problem is Writing XML" Watch "Problem is Writing XML" New topic

Problem is Writing XML

Prasad Ballari
Ranch Hand

Joined: Sep 23, 2000
Posts: 149

Can anybody help me out.
I am using writeUTF to create XML file as the requirement is of using unicode..BUt writeUTF is writing high order bits at first..due to this the xml file is not validated...Is there any ways to remove that bits from xml file....
I tried with reading & writing file again but..due to its nature of unicode it shows junk character...
Thanks in advance
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
Is there a reason why you are not creating plain ASCII xml files using editors like notepad?

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Prasad Ballari
Ranch Hand

Joined: Sep 23, 2000
Posts: 149
Thanks for reply.
The data is being fetched from AS/400 & its in Arabic..If i use normal way of writing file,the arabic data appears as juck characters..Thants the reason to use writeUTF method,but the major problem is first two bytes...If we can remove, then the XML file will be validated.
The XML file generated in this way is being used by other applications with Apache parser...
Pls suggest me some solution
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem is Writing XML
It's not a secret anymore!