Re: [bdbxml] problem with XML file validation
John Snelson <[email protected]> Tue, 20 Sep 2005 11:44:06 +0100
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
[Originally answered on the Parthenon DB XML .NET API mailing list]
In order to validate your XML file, DB XML is trying to access an
external file (XML Schema, DTD etc.). However, you haven't enabled
external access for DB XML, or provided another means of obtaining the
resource that is needed.
The simplest way to solve your problem is to set
ManagerConfig.AllowExternalAccess to true, which will allow DB XML to
fetch the resource itself.
You could also implement a Resolver class and set it on the Manager, if
you wanted DB XML to find these resources in an alternative location.
John
Luigi Gigliotti wrote:
> Hi,
>
> i need help about xml validation:
>
> Language used for programming: C#
> API used for accessing to DBXML: Parthenon API last version
>
> when i insert a xml file into db, and the validation is disabled, the
> query works correctly; if enable the validation, an exception is thrown:
>
> Sleepycat.DbXml.DbXmlException: Error: XML Indexer: Fatal Parse error in
> document at line, 3, char 240.
> Parser message: An exception occurred! Type:RuntimeException,
> Message:Could not open external entity '{0}', exception code =
> INDEXER_PARSER_ERROR
> at
> Sleepycat.DbXml.Internal.DbXmlExceptionThrower.ThrowXmlException(Int32
> code, String message)
> at
> Sleepycat.DbXml.Internal.DbXmlPINVOKE.XmlContainer_putDocument__SWIG_3(IntPtr
> jarg1, IntPtr jarg2, String jarg3, IntPtr jarg4, IntPtr jarg5, UInt32 jarg6)
> at Sleepycat.DbXml.Container.PutDocument(Transaction txn, String name,
> InputStream input, UpdateContext context, DocumentConfig config)
> at main.TestCreazioneDb.insertDocument(String nomeFile, String alias)
> etc etc...
>
> does someone know the reason of this mistake?
>
> I thank you in advance.
> best regards Luigi Gigliotti
>
--
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com
Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml
------------------------------------------
To remove yourself from this list, send an
email to [email protected]