Fix a couple bugs. 1. need to apply the namespace before returning from getElementTree 2. allow a namespace map to be passed into toxml 3. Use the Document class's nameSpaceMap object with ElementGenerator  if one has been set.
Fix a couple bugs.
1. need to apply the namespace before returning from getElementTree
2. allow a namespace map to be passed into toxml
3. Use the Document class's nameSpaceMap object with ElementGenerator
 if one has been set.

sassoftware/xobj,sassoftware/xobj,sassoftware/xobj,sassoftware/xobj