#! /usr/bin/python
# -*- coding: utf-8 -*-

import codecs
import foo
from lxml import etree

arabic = u'هذا هو الاختبار.'
japanese = u'これはテストです。'
russian = u'Это тест.'

a = foo.Foo()
a.foo = arabic

with codecs.open( 'foo.xml', 'w', 'utf-8' ) as out:
	xml = a.to_etree()
	out.write( etree.tostring(xml, pretty_print = True) )
