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
Post a Comment