Expanded the writeXML functions for XMLMdClass and XMLMetadata.