java - DOM parsing an XML file - "Invalid byte 1 of 1-byte UTF-8 sequence." -


i trying parse xml file in following way:

    system.out.println(path);     file f = new file(path);             try {         document = builder.parse(f);     } catch (saxexception e) {         // todo auto-generated catch block         e.printstacktrace();     } catch (ioexception e) {         // todo auto-generated catch block         e.printstacktrace();     } 

f path .xml file following header:

<?xml version="1.0"?> 

as understand it, means has utf-8 encoding. error occurs if not have utf-8 encoding. doing wrong?


Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -