private Unanalyzed_METS_Section store_dmd_sec(XmlReader R)
{
// Save all the inner XML and attributed for later analysis
string dmdSecId = String.Empty;
List<KeyValuePair<string, string>> attributes = new List<KeyValuePair<string, string>>();
// Get the attributes for this DMD section
R.Read();
while (R.MoveToNextAttribute())
{
attributes.Add(new KeyValuePair<string, string>(R.Name, R.Value));
if (R.Name == "ID")
dmdSecId = R.Value;
}
// The next new element should be mdWrap, but read through white spaces
// and get to the mdwrap element
do
{
R.Read();
} while (R.Name.ToLower().Replace("mets:","") != "mdwrap");
// Now, should be at the mdWrap element
string outerXML = R.ReadOuterXml();
return new Unanalyzed_METS_Section(attributes, dmdSecId, outerXML);
}