Solvberget.Domain.DTO.Book.FillProperties C# (CSharp) Method

FillProperties() protected method

protected FillProperties ( string xml ) : void
xml string
return void
        protected override void FillProperties(string xml)
        {
            base.FillProperties(xml);

            var xmlDoc = XDocument.Parse(xml);
            if (xmlDoc.Root != null)
            {
                var nodes = xmlDoc.Root.Descendants("oai_marc");
                ClassificationNr = GetVarfield(nodes, "090", "c");
                StdOrOrgTitle = GetVarfield(nodes, "240", "a");
                Numbering = GetVarfield(nodes, "245", "n");
                Edition = GetVarfield(nodes, "250", "a");
                NumberOfPages = GetVarfield(nodes, "300", "a");
                Content = GetVarfield(nodes, "505", "a");
                ReferredPersons = GeneratePersonsFromXml(nodes, "600");
                ReferredOrganizations = GenerateOrganizationsFromXml(nodes, "610");
                ReferencedPlaces = GetVarfieldAsList(nodes, "651", "a");
                Subject = GetVarfieldAsList(nodes, "650", "a");
                Genre = GetVarfieldAsList(nodes, "655", "a");
                InvolvedPersons = GeneratePersonsFromXml(nodes, "700");
                InvolvedOrganizations = GenerateOrganizationsFromXml(nodes, "710");
            }
        }

Usage Example

コード例 #1
0
ファイル: Book.cs プロジェクト: digbib/Solvberget
 public static new Book GetObjectFromFindDocXmlBsMarc(string xml)
 {
     var book = new Book();
     book.FillProperties(xml);
     return book;
 }