if self.get_field('DirectoryPath') is not None:
            directory_path = self.get_field('DirectoryPath')
            d_path = doc.createElement('sr:DirectoryPath')
            d_path.appendChild(doc.createTextNode(directory_path))
            ur.appendChild(d_path)