• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML parse error

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.

I have written a java program which connects db2 database and gets some columns and writes into a .xml file. Now i when i open the file in xml format there data is fine is no error.
But when i open the file in excel format , it shows some error called "XML parse error. unable to open . Data failed ".

In my opinion the error is due to some unreadable special characters present in the columns in database.
How do i get the data in excel sheet without any errors. How do i rectify the problem by avoiding the unnecessary characters.

Please help me.
Thnaks in advance.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will want to write the XML document correctly. In particular (1) you should use an encoding which can encode all of the characters in your document -- UTF-8 works nicely, or UTF-16 if your document is mostly non-European scripts -- and (2) when you write the document you should actually use that encoding.

Here's a link to a tutorial about XML and encodings.
 
reply
    Bookmark Topic Watch Topic
  • New Topic