Hi again,
My mistake: in the code lines
String[] xmlFiles = {getXfrDir(fileName) };
dataIO.writeDataToDatabase(platform, model, xmlFiles);
The variable fileName did not contain the data xml file name but another file
name.
Hence the parser complaining about the file format ... I should have known.
Sorry for the inconvenience.
Enjoyt your weekend ... I will now,
[EMAIL PROTECTED]
The Computing Froggy
----- Message d'origine ----
De : Laurent ROCHE <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Samedi, 24 Novembre 2007, 4h40mn 40s
Objet : Can not read data file
Hi,
Now that I can read and load a model, and also export data according to
the model, I can not read the data file.
I get the following error:
Digester.fatalError(1558) | Parse Fatal Error at line 1 column 1:
Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
Does anyone have any idea of where does this come from ?
Here are the lines reading the data file:
Platform platform =
PlatformFactory.createNewPlatformInstance(dataSource);
DatabaseDataIO dataIO = new DatabaseDataIO();
dataIO.setDetermineSchema(true);
dataIO.setSchemaPattern(XFR_IN_SCHEMA);
DatabaseIO reader = new DatabaseIO();
reader.setValidateXml(false);
reader.setUseInternalDtd(true);
Database model = reader.read(getModelFPN(), XFR_IN_SCHEMA);
String[] xmlFiles = {getXfrDir(fileName) };
dataIO.writeDataToDatabase(platform, model, xmlFiles);
I am obviously doing something wrong ... but I can not see what ! ? !
Any help appreciated.
Cheers,
[EMAIL PROTECTED]
The Computing Froggy
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
Mail
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail