Hello,
I try to read a xml file in a specific KM Task scheduler :
1) XML file is on dist/PORTAL-INF/users.xml
2) By run() method, i would like to try to read this file but it doesn't work, what
can be the problem ?
public void run( String id, Properties properties ) {
URL myurl = getClass().getClassLoader().getResource("users.xml");
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File(myurl.getFile()));
doc.getDocumentElement ().normalize ();
}
catch...
}
What can be the problem ?
Thanks a lot and Best regards