DBXML and the Xerces DOM

N

nikki

I downloaded Berkeley DB XML and put together a test script to load a
large 250mb XML file into the database. Storage and retrieval works
great, but I need DOM access to the file without loading it all into a
string and re-parsing it. In the c++ api (they used swig to expose c+
+ to python) it says there is a XmlDocument::getContentAsDOM() method,
but when I try to access it via python I just get an attribute error.
I looked in the source and the method isn't mapped at all! Has anyone
had this work, ever?


from dbxml import *

mgr = XmlManager()
container = mgr.openContainer("test.dbxml")
document = container.getDocument('test1')
dom = document.getContentAsDOM()


Traceback (most recent call last):
File "look.py", line 10, in ?
dom = document.getContentAsDOM()
File "/usr/lib/python2.4/site-packages/dbxml.py", line 277, in
<lambda>
__getattr__ = lambda self, name: _swig_getattr(self, XmlDocument,
name)
File "/usr/lib/python2.4/site-packages/dbxml.py", line 28, in
_swig_getattr
raise AttributeError,name
AttributeError: getContentAsDOM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top