SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 311 | Next

Scott Klein

"Professional LINQ"

Parse(empInfo, LoadOptions.None)
Me.TextBox1.Text = emp.ToString
Here are the results:


Scott


190
Chapter 9: LINQ to XML and Visual Basic .NET
You can see that all of the insignificant whitespace has been ignored. Next, modify the load option
to this:
Dim emp As XElement = XElement.Parse(empInfo, LoadOptions.PreserveWhitespace)
When you run the code now, all the insignificant whitespace is preserved:

Scott

Specify multiple load options by using an And or Or operator, like this:
Dim emp As XElement = XElement.Parse(empInfo, LoadOptions.SetBaseUri And
LoadOptions.SetLineInfo)
These load options can assist you in your manipulation of the XML document, such as controlling how
the whitespace is preserved and tracking the line information for each element in the tree.
LINQ to XML Visual Basic Example
This example is going to use the XML document employees.xml that you created earlier, in the
section ??????Loading XML.


Pages:
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6