WBXML -> XML for Python (PyWBXML)

Steps I’ve had to take to get a working lib on Ubuntu Gutsy Gibbon:

EDIT: Turns out this will only work with the WindowMobile version of WBXML and not with the Nokia/Symbian version.

install Expat XML Parser, automake, autoconf, and libtool (required for libwbxml)

sudo apt-get install libexpat1-dev automake libtool

download, compile and install latest version of libwbxml (wbxml2)
Use the version that comes with SyncE, I decided to checkout (export) the latest svn trunk.

svn export http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches
svn export http://libwbxml.aymerick.com/repo/wbxml2/trunk wbxml2

Apply patches

cd wbxml2
patch -p1 < ../patches/wbxml-svn-r48-build.patch
patch -p1 < ../patches/wbxml-svn-r48-anonymous.patch
patch -p1 < ../patches/wbxml-svn-r48-namespace.patch

Now build and install

chmod +x bootstrap
./bootstrap
./configure
make all
sudo make install
make clean

make sure python-dev libs are installed

sudo apt-get install python2.4-dev

install Pyrex
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
*note: setup.py has a couple of errors, apply these corrections:
insert after first 3 comment lines:

import distutils

and add a parenthesis at the end of line 9

sudo python setup.py install

download, compile and install pywbxml from SyncE

svn export http://synce.svn.sourceforge.net/svnroot/synce/trunk/pywbxml
./bootstrap
./configure
make
sudo make install
make clean

That’s it! Here are examples provided by SyncE:
http://synce.svn.sourceforge.net/svnroot/synce/trunk/pywbxml/tests/

Leave a reply