Python, XML and XPath

Hole h0leforfun at
Wed Dec 17 15:11:45 CET 2008

Hi all,

I hope this is not an "overasked" question but I find myself quite
confused about python xml management (I have to use python for a
project and I come from java world, you know...where frameworks,
libraries and tools to use are standard de iure or standard de facto).

I need to use XML parsing with xpath: a simple xml reader.

I've found that the standard distribution of python doesn't include
xpath support modules so I've decided to add libxml2.

I've installed cygwin c compiler but I still have errors like the

C:\Python25\Lib\libxml2-python-2.6.9>python build install
C:\Python25\lib\distutils\ UserWarning: 'licence'
distribution option is deprecated; use 'license'
running build
running build_py
running build_ext
building 'libxml2mod' extension
writing build\temp.win32-2.5\Release\libxml2mod.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build
\temp.win32-2.5\Release\libxml2-py.o build\temp.win32-2.5\Release
\libxml.o build\temp.win32-2.5\Release\types.o build
.def -L/usr\lib -LC:\Python25\libs -LC:\Python25\PCBuild -llibxslt -
llibexslt -llibxml2 -lpython25 -lmsvcr71 -o build
undefined reference to `_imp__xmlFree'
undefined reference to `_imp__xmlFree'
undefined reference to `_imp__xmlFree'
undefined reference to `_imp__xmlFree'
undefined reference to `_imp__xmlFree'
more undefined references to `_imp__xmlFree' follow

Does anyone know how to solve this issue or has suggestions for
another (easy-to-install) xml-xpath library?

Thanks for your support!

More information about the Python-list mailing list