Added XmlElement test and possible fixes to fix test

Had a problem with a generated XmlAny property from a xsd. 
I added the XmlElement to a test and made a few fixes to allow the test to succeed.