I'm trying to migrate some perl code to python and it uses Sleeypcat::DbXml 'simple'
to get read access to a .dbxml
file, creates a XmlManager
, calls createQueryContext
, openContainer
and query
to get an XmlValue
. I have found https://pypi.org/project/berkeleydb/ to support the Berkeley DB in general, but it has no mention of this XML layer. Is there an existing API I can use in python 3?
Is there a python binding to the Berkeley DB XML database?
96 Views Asked by snoopyjc At
2
There are 2 best solutions below
0

Berkeley DB and Berkeley DB XML are two different products. My python bindings (legacy "bsddb3" and current "berkeleydb") only interface with Berkeley DB.
I am not aware of any Python bindings for Berkeley DB XML.
I am a freelance with commercial contracts, if that option would be useful to you.
Berkeley dbxml does come with a Pyhon bindings. I ended up having to make modifications to the SWIG interface files to get it to run with Python3. If you are interested in building for a recent Python, you will need to make some modifications to the Python interface file. Specifically, you have to
You then need to regenerate the swig interface and recompile the module. I don't know StackOverflow's policy on posting patches, but if it's allowed I'd be happy to post the patches that I created for dbxml 6.1.4 and Python 3.9 for you. Getting it all compiled is a little bit of work, but very doable.