I get the below error when trying to update an array of xml files.
Snippet if code:
File dir = new File("c:\\XML");
File[] files = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".xml");
}
});
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document doc = docBuilder.parse(Arrays.toString(files));
ERROR:
java.net.MalformedURLException: no protocol: [c:\XML\file.xml, c:\XML\file2.xml, c:\XML\file3.xml]
Can someone please point me in the right direction?
Thanks a lot,
Adam