public override void Load(XmlElement parentNode) { if (parentNode == null) { throw new ArgumentNullException("parentNode"); } this.authors = LoadObjectList<IAuthorInfoNode, AuthorInfoNode>(parentNode, "./fb:author"); this.programUsed = LoadElement(parentNode, "./fb:program-used"); this.date = LoadObject<DateTimeNode>(parentNode, "./fb:date"); this.sourceUrl = LoadElementsList(parentNode, "./fb:src-url"); this.sourceOCR = LoadElement(parentNode, "./fb:src-ocr"); this.id = LoadElement(parentNode, "./fb:id"); this.history = LoadElementXml(parentNode, "./fb:history"); this.publishers = LoadObjectList<IAuthorInfoNode, AuthorInfoNode>(parentNode, "./fb:publisher"); try { this.version = float.Parse(LoadElement(parentNode, "./fb:version"), CultureInfo.InvariantCulture); } catch { this.version = null; } }
public override void Load(XmlElement parentNode) { if (parentNode == null) { throw new ArgumentNullException("parentNode"); } this.genres = LoadObjectList<IGenreInfoNode, GenreInfoNode>(parentNode, "./fb:genre"); this.authors = LoadObjectList<IAuthorInfoNode, AuthorInfoNode>(parentNode, "./fb:author"); this.bookTitle = LoadElement(parentNode, "./fb:book-title"); this.annotation = LoadObject<AnnotationInfoNode>(parentNode, "./fb:annotation"); this.keywords = LoadElement(parentNode, "./fb:keywords"); this.date = LoadObject<DateTimeNode>(parentNode, "./fb:date"); this.coverpage = LoadElementXml(parentNode, "./fb:coverpage"); this.lang = LoadElement(parentNode, "./fb:lang"); this.sourceLang = LoadElement(parentNode, "fb:src-lang"); this.translators = LoadObjectList<IAuthorInfoNode, AuthorInfoNode>(parentNode, "./fb:translator"); this.sequences = LoadObjectList<ISequenceInfoNode, SequenceInfoNode>(parentNode, "./fb:sequence"); }