/// <summary>
 /// convert the xml representation of this class into the document and metadata properties
 /// </summary>
 /// <param name="reader"></param>
 public void ReadXml(XmlReader reader)
 {
     // good place for debug logging
     try
     {
         // take the reader, turn into an XmlDocument, then parse out the metadata and documents
         XmlDocument xmldoc = new XmlDocument();
         xmldoc.LoadXml(reader.ReadOuterXml());
         submissionMetadata = xmldoc.SelectSingleNode(@".//*[local-name()='SubmitObjectsRequest']");     // cheating and ignoring namespaces
         if (submissionMetadata == null)
         {
             // good place for debug logging
             throw new Exception("P&RRequestXDSB Reader cannot find SubmitObjectsRequest");
         }
         XmlNodeList theDocs = xmldoc.SelectNodes(@".//*[local-name()='Document']");
         if (theDocs == null)
         {
             // good place for debug logging
             throw new Exception("P&RRequestXDSB Reader cannot find Document");
         }
         foreach (XmlNode aDoc in theDocs)
         {
             SubmissionDocument theDoc = new SubmissionDocument();
             theDoc.documentID   = aDoc.Attributes["id"].Value.ToString();
             theDoc.documentText = Convert.FromBase64String(aDoc.InnerText);
             submissionDocuments.Add(theDoc);
         }
     }
     catch (Exception ex)
     {
         // good place for debug logging
         throw ex;
     }
     // good place for debug logging
 }
 /// <summary>
 /// convert the xml representation of this class into the document and metadata properties
 /// </summary>
 /// <param name="reader"></param>
 public void ReadXml(XmlReader reader)
 {
    // good place for debug logging
     try
     {
         // take the reader, turn into an XmlDocument, then parse out the metadata and documents
         XmlDocument xmldoc = new XmlDocument();
         xmldoc.LoadXml(reader.ReadOuterXml());
         submissionMetadata = xmldoc.SelectSingleNode(@".//*[local-name()='SubmitObjectsRequest']");     // cheating and ignoring namespaces
         if (submissionMetadata == null)
         {
             // good place for debug logging
             throw new Exception("P&RRequestXDSB Reader cannot find SubmitObjectsRequest");
         }
         XmlNodeList theDocs = xmldoc.SelectNodes(@".//*[local-name()='Document']");
         if (theDocs == null)
         {
             // good place for debug logging
             throw new Exception("P&RRequestXDSB Reader cannot find Document");
         }
         foreach (XmlNode aDoc in theDocs)
         {
             SubmissionDocument theDoc = new SubmissionDocument();
             theDoc.documentID = aDoc.Attributes["id"].Value.ToString();
             theDoc.documentText = Convert.FromBase64String(aDoc.InnerText);
             submissionDocuments.Add(theDoc);
         }
     }
     catch (Exception ex)
     {
         // good place for debug logging
         throw ex;
     }
     // good place for debug logging
 }