I just spend the best part of 50 minutes getting lxml running on Dreamhost (really not recommended as a host, at all). Here's what I hope is a working shell script that takes a pristine Dreamhost site and installs lxml on it.
#!/bin/sh
mkdir work
cd work
curl -O ftp://xmlsoft.org/libxml2/LATEST_LIBXML2
curl -O ftp://xmlsoft.org/libxml2/LATEST_LIBXSLT
tar -xzf LATEST_LIBXML2
tar -xzf LATEST_LIBXSLT
cd libxml2-*
./configure --prefix=${HOME}/.local
make
make install
cd ../libxslt-*
./configure --prefix=${HOME}/.local --with-libxml-prefix=${HOME}/.local --with-libxml-include-prefix=${HOME}/.local/include --with-libxml-libs-prefix=${HOME}/.local/lib
make
make install
export LDFLAGS=-L/$HOME/.local/lib
export CPPFLAGS=-I/$HOME/.local/include
export LD_RUN_PATH=$HOME/.local/lib
curl -O http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install --prefix=~/.python lxml
python -c "from lxml import etree"