> This seems kinda wierd - it seems like its not finding the file. I'm not
> sure if it'll make much difference but does changing this line...
>
> > SAXReader reader = new SAXReader();
> > Document doc = reader.read(new File(ENGLISH_STAGING_FILE));
>
> To
>
> Document doc = reader.read(ENGLISH_STAGING_FILE);
>
> make any difference?
Unfortunately, no. I've even gone so far as to put a dummy xml file on my
local HD (the other drive was a samba mount) and try with that, same result.
The sample xml file is below, no problems there.
<?xml version="1.0" encoding="ISO-8859-1"?>
<publishing>
<make></make>
</publishing>
The code I'm using is below - I've even added testing to print out the xml
file to System.err, which prints just fine. I'm at a loss to explain the
problem, I was really hoping to use dom4j since the xpath integration would
be very useful for me.
SAXReader reader = new SAXReader();
Document doc = null;
if (language.equals(FRENCH) && version.equals(STAGING)) {
doc = reader.read(new File(FRENCH_STAGING_FILE));
}
else if (language.equals(ENGLISH) && version.equals(STAGING)) {
doc = reader.read(new File(ENGLISH_STAGING_FILE));
}
else if (language.equals(FRENCH) && version.equals(PRODUCTION)) {
doc = reader.read(new File(FRENCH_PRODUCTION_FILE));
}
else if (language.equals(ENGLISH) && version.equals(PRODUCTION)) {
if (!(new File(ENGLISH_PRODUCTION_FILE)).exists()) {
System.err.println("not exist");
}
else {
System.err.println("exists");
BufferedReader br = new BufferedReader(new
FileReader(ENGLISH_PRODUCTION_FILE));
String line = "";
while ((line=br.readLine()) != null) {
System.err.println(line);
}
br.close();
}
doc = reader.read(new File(ENGLISH_PRODUCTION_FILE));
}
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user