String filepath = E:\TestCode\My Demo File\abc.xml
I am trying to create file using this file path, this file path having spaces.
FileInputStream file = new FileInputStream(new File(filePath));
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
Document xmlDocument = builder.parse(file);
It throws a FileNotFoundException
.