#668 use extension method to create object instance
Merge pull request #708 from markwoodhall/xmlmetadata

#668 use extension method to create object instance