示例#1
0
        void ReadArabicVerses(XElement chapterNode, Chapter chapter)
        {
            foreach (XElement verseNode in chapterNode.Descendants("aya"))
            {
                int    verseIndex = int.Parse(verseNode.Attribute("index").Value);
                string arabicText = verseNode.Attribute("text").Value;

                var verse = new Verse(
                    index: verseIndex,
                    arabicText: arabicText
                    );
                chapter.AddVerse(verse);
            }
        }