Don't be so aggressive with quotes, let options be empty if null
Use double quotes here
Use get/set accessors for __geom_confxml in the hope of fixing memory
leak with our usage of libxml2.  Quote http://xmlsoft.org/python.html:

    Also note the need to explicitly deallocate documents with
    freeDoc() . Reference counting for libxml2 trees would need
    quite a lot of work to function properly, and rather than
    risk memory leaks if not implemented correctly it sounds safer
    to have an explicit function to free a tree.   The wrapper
    python objects like doc, root or child are them automatically
    garbage collected.
More fixes for names with spaces
Use existing functions instead of recreating them