private Unanalyzed_METS_Section store_amd_sec( XmlReader R )
{
// Save all the inner XML and attributed for later analysis
string amdSecId = String.Empty;
List<KeyValuePair<string, string>> attributes = new List<KeyValuePair<string, string>>();
// Get the attributes for this AMD section
R.Read();
while (R.MoveToNextAttribute())
{
attributes.Add(new KeyValuePair<string, string>(R.Name, R.Value));
if (R.Name == "ID")
amdSecId = 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, amdSecId, outerXML);
}