libxml2dom problems

A

ankit

I am using libxml2dom but having problem when parsing. It gives me the
following error:

File "exlibxml2dom.py", line 4, in ?
document = libxml2dom.parse("moc.xml")
File "/usr/lib/python2.2/site-packages/libxml2dom/__init__.py", line
472, in parse
return parseFile(stream_or_string, html)
File "/usr/lib/python2.2/site-packages/libxml2dom/__init__.py", line
484, in parseFile
return Document(Node_parseFile(filename, html))
File
"/usr/lib/python2.2/site-packages/libxml2dom/macrolib/macrolib.py",
line 431, in parseFile
libxml2mod.xmlCtxtUseOptions(context, XML_PARSE_NOERROR |
XML_PARSE_NOWARNING | XML_PARSE_NONET)
AttributeError: 'module' object has no attribute 'xmlCtxtUseOptions'


LET me know what is the problem with this ...
 
F

Fredrik Lundh

ankit said:
I am using libxml2dom but having problem when parsing. It gives me the
following error:

File "exlibxml2dom.py", line 4, in ?
document = libxml2dom.parse("moc.xml")
File "/usr/lib/python2.2/site-packages/libxml2dom/__init__.py", line
472, in parse
return parseFile(stream_or_string, html)
File "/usr/lib/python2.2/site-packages/libxml2dom/__init__.py", line
484, in parseFile
return Document(Node_parseFile(filename, html))
File
"/usr/lib/python2.2/site-packages/libxml2dom/macrolib/macrolib.py",
line 431, in parseFile
libxml2mod.xmlCtxtUseOptions(context, XML_PARSE_NOERROR |
XML_PARSE_NOWARNING | XML_PARSE_NONET)
AttributeError: 'module' object has no attribute 'xmlCtxtUseOptions'

LET me know what is the problem with this ...

I'm not sure posting the same question over and over and over again is really
the best way to get help. I recommend waiting at least 24 hours, and making
sure that you add more information to each followup message.

But alright, I guess I can guess: the error message says that the libxml2mod
module doesn't have a xmlCtxtUseOptions function. Two seconds with google
indicates that this is a libxml2 function that was added in 2.6.X. If it's not avail-
able in your install, chances are that you're using an outdated version of libxml2
(or an old version of the Python bindings).

</F>
 
A

ankit

Thanks .. frederik.
The reason for posting the problem 2 times is that there might be some
problem yesterday with the google groups server . After posting the
mesage I cant see it on the board. That's why I posted again.

anyway thanks for the help
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top