writeAttribute() example

By Iain Cuthbertson