fixed and refactored the interface and implementation of foundation::XMLElement.