From: Mattio V. <mat...@gm...> - 2008-11-22 19:08:49
|
Hello, I just downloaded and installed eXist and I'm trying to load some XML files. Since I'll be loading the documents via code if I use the system, I was trying to write XQuery for loading in the sandbox. Unfortunately I keep getting the same error. The XQuery I'm trying to run is: declare namespace xmldb="http://exist-db.org/xquery/xmldb"; let $load-status := xmldb:store("test", "test.xml", "C:\test.xml") return <load-status> { $load-status } </load-status> The XML file is: <?xml version="1.0" encoding="utf-8"?> <root> <p>Sample paragraph.</p> </root> The error message I'm getting is: Error while evaluating expression: declare namespace xmldb="http://exist-db.org/xquery/xmldb"; let $load-status := xmldb:store("test", "test.xml", "C:\test.xml") return { $load-status } . XMLDB reported an exception while storing documentorg.xmldb.api.base.XMLDBException: fatal error at (1,1) : Content is not allowed in prolog. [at line 120, column 21] In call to function: sandbox:exec-query(xs:string) [134:10] I found a couple of eXist emails about this error relating to BOM, but they're several years old. Any suggestions or pointers? Thanks! |