Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems reading an xml from a url

 
Weber Christopher
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i've got a problem with an xml file, that i read from a url. when i run my class locally, it works just fine. but after i intergrate into our cms system i am getting following exception:



Does anyone know how i can change the encoding in the inputstream befor i parse it with the sax parser?

Thank you very much (hope my english is getting better here )
my code:

 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think that you have to specify the encoding to the parser.It figures this itself if the encoding attribute is not specified in the XML prolog.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic