I am quite new to developing using the BaseX api, and I keep running into some trouble with one of the methods. I have a database created and opened, but when I try to use the Add method it throws an exception. See this page for an example from BaseX.
I have created the Database in another section of the code, and the file I am trying to add also exists on my computer. My snippet of code looks like this:
//Opens the database
new Open(databaseName).execute(context);
//adds file to database
new Add("", directoryPath + indexName + "/" + catalog.getInternalID() + ".Catalog.xml").execute(context);
The error I am getting is this:
org.basex.core.BaseXException: "~/cdsp.Catalog.xml" (Line 1): whitespace expected, attribute name found.
I do not really know what this means, when I try to add other xml files to the database they work and I have not found much googleing this exception. Any help would be much appreciated. Thanks!