/// <summary> Reads metadata from an open stream and saves to the provided item/package </summary> /// <param name="Input_Stream"> Open stream to read metadata from </param> /// <param name="Return_Package"> Package into which to read the metadata </param> /// <param name="Options"> Dictionary of any options which this metadata reader/writer may utilize </param> /// <param name="Error_Message">[OUTPUT] Explanation of the error, if an error occurs during reading </param> /// <returns>TRUE if successful, otherwise FALSE </returns> public bool Read_Metadata(Stream Input_Stream, SobekCM_Item Return_Package, Dictionary <string, object> Options, out string Error_Message) { // Set default error outpt message Error_Message = String.Empty; // Create a XML reader and read the metadata XmlTextReader nodeReader = null; bool returnValue = true; try { // create the node reader nodeReader = new XmlTextReader(Input_Stream); DC_METS_dmdSec_ReaderWriter.Read_Simple_Dublin_Core_Info(nodeReader, Return_Package.Bib_Info); } catch (Exception ee) { Error_Message = "Error reading DC from stream: " + ee.Message; returnValue = false; } finally { if (nodeReader != null) { nodeReader.Close(); } } return(returnValue); }