It is possible to read the complete content of a xml files inside a folder with java?
My code is:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new FileInputStream(new
File("C:\\Users\\Administrator\\eclipse-workspace\\XMLExamples2\\")));
Element element = (Element) doc.getElementsByTagName("composite").item(0);
// Adds a new attribute. If an attribute with that name is already present
// in the element, its value is changed to be that of the value parameter
element.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-
instance");
element.setAttribute("xsi:noNamespaceSchemaLocation", "v1_6.xsd");
I'm just able to read and manipulate single files when it put the name after ...\XMLExample2\