Added new constructor

New constructor takes in XDocument rather than path