Use the same classloader that loaded the classes.
Put the xml file and other files you wish to load right next to the
class files, then:
InputStream is = getClass().getClassLoader().getResourceAsStream();
try
{
// use 'is' here to extract the DOM from, DocumentBuilderFactory, etc...
}
finally
{
is.close();
}