473,465 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

libxml2dom problems

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 ...

Dec 27 '05 #1
2 1586
"ankit" <an************@gmail.com> wrote:
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>

Dec 27 '05 #2
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

Dec 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ankit | last post by:
Hi I am using libxml2dom package for DOM support in libxml2. There are some test programs in the package when I try to run that samples it give me following error: Traceback (most recent call...
1
by: ankit | last post by:
Hi, I am working with libxml2dom package for having DOM support with libxml2. There are some test examples are given along with the package but when I try to run that, it gives me following...
4
by: ankit | last post by:
I had installed libxml2 for python (libxml2-python-2.6.22.win32-py2.4) on WINDOWS. For having dom support I am installing libxml2dom (0.3). My python version on win is 2.4 but when I give run the...
0
by: bruce | last post by:
hi paul... in playing around with the test python app (see below) i've got a couple of basic questions. i can't seem to find the answers via google, and when i've looked in the libxml2dom stuff...
2
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, I've a xml svg file and I would like to update it with Python. First, I would like to fetch one dom node with getElementByID. I've one issue about this method. This is my example : ...
2
by: bruce | last post by:
Hi... I'm using quick test with libxml2dom =============== import libxml2dom aa=libxml2dom.parseString(foo) ff=libxml2dom.toString(aa)
1
by: bruce | last post by:
hi... i've got the following situation, with the following test url: "http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#". i can generate a list of the tables i want for the courses on the...
0
by: bruce | last post by:
hi... i can use an xpath query to create a node from an html/dom representation. however, if i have a node, is there a way to generate an xpath query from the node. in testing with...
0
by: John J Lee | last post by:
On Mon, 1 Sep 2008, bruce wrote: Just a general point: try lxml.etree instead? Friendlier API. John
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.