private static void read_physical_description(XmlReader r, PhysicalDescription_Info description) { while (r.Read()) { if ((r.NodeType == XmlNodeType.EndElement) && ((r.Name == "mods:physicalDescription") || (r.Name == "physicalDescription"))) break; if (r.NodeType == XmlNodeType.Element) { if ((r.Name == "mods:extent") || (r.Name == "extent")) { r.Read(); if (r.NodeType == XmlNodeType.Text) { description.Extent = r.Value; } } else if ((r.Name == "mods:note") || (r.Name == "note")) { r.Read(); if (r.NodeType == XmlNodeType.Text) { description.Add_Note(r.Value); } } else if ((r.Name == "mods:form") || (r.Name == "form")) { string type = String.Empty; string authority = String.Empty; if (r.MoveToAttribute("type")) type = r.Value; if (r.MoveToAttribute("authority")) authority = r.Value; r.Read(); if (r.NodeType == XmlNodeType.Text) { description.Form_Info.Form = r.Value; if (type.Length > 0) description.Form_Info.Type = type; if (authority.Length > 0) description.Form_Info.Authority = authority; } } } } }
/// <summary> Constructor for a new instance of the MODS_Info class. </summary> public MODS_Info() { // Perform some preliminary configuration ModsOriginInfo = new MODS_Origin_Info(); accessCondition = new AccessCondition_Info(); originalPhysicalDesc = new PhysicalDescription_Info(); //physicalDesc = new PhysicalDescription_Info(); mainTitle = new Title_Info(); type = new TypeOfResource_Info(); recordInfo = new Record_Info(); }