@@ -116,22 +116,22 @@ private void TestMethod()
116116 {
117117 var catalog = new XDocument(
118118new XElement(""Catalog"",
119- new XElement(""Book"", new XAttribute(""id"", ""bk101""),
120- new XElement(""Author"", ""Garghentini, Davide""),
121- new XElement(""Title"", ""XML Developer's Guide""),
122- new XElement(""Price"", ""44.95""),
123- new XElement(""Description"", @""
119+ new XElement(""Book"", new XAttribute(""id"", ""bk101""),
120+ new XElement(""Author"", ""Garghentini, Davide""),
121+ new XElement(""Title"", ""XML Developer's Guide""),
122+ new XElement(""Price"", ""44.95""),
123+ new XElement(""Description"", @""
124124 An in-depth look at creating applications
125125 with "", new XElement(""technology"", ""XML""), @"". For
126126 "", new XElement(""audience"", ""beginners""), @"" or
127127 "", new XElement(""audience"", ""advanced""), @"" developers.
128128 "")
129- ),
130- new XElement(""Book"", new XAttribute(""id"", ""bk331""),
131- new XElement(""Author"", ""Spencer, Phil""),
132- new XElement(""Title"", ""Developing Applications with Visual Basic .NET""),
133- new XElement(""Price"", ""45.95""),
134- new XElement(""Description"", @""
129+ ),
130+ new XElement(""Book"", new XAttribute(""id"", ""bk331""),
131+ new XElement(""Author"", ""Spencer, Phil""),
132+ new XElement(""Title"", ""Developing Applications with Visual Basic .NET""),
133+ new XElement(""Price"", ""45.95""),
134+ new XElement(""Description"", @""
135135 Get the expert insights, practical code samples,
136136 and best practices you need
137137 to advance your expertise with "", new XElement(""technology"", @""Visual
@@ -140,21 +140,23 @@ and best practices you need
140140 based on professional,
141141 pragmatic guidance by today's top "", new XElement(""audience"", ""developers""), @"".
142142 "")
143- )
143+ )
144144)
145145
146146);
147147 var htmlOutput = new XElement(""html"",
148+
148149 new XElement(""body"", from book in catalog.Elements(""Catalog"").Elements(""Book"")
149150 select new XElement(""div"",
150- new XElement(""h1"", book.Elements(""Title"").Value),
151- new XElement(""h3"", ""By "" + book.Elements(""Author"").Value),
152- new XElement(""h3"", ""Price = "" + book.Elements(""Price"").Value),
151+ new XElement(""h1"", book.Elements(""Title"").Value),
152+ new XElement(""h3"", ""By "" + book.Elements(""Author"").Value),
153+ new XElement(""h3"", ""Price = "" + book.Elements(""Price"").Value),
154+
153155
154156 new XElement(""h2"", ""Description""), TransformDescription((string)book.Elements(""Description"").ElementAtOrDefault(0)), new XElement(""hr"")
155- )
156- )
157- );
157+ )
158+ )
159+ );
158160 }
159161
160162 public string TransformDescription(string s)
0 commit comments