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 258 | Next

Scott Klein

"Professional LINQ"

In this example, you could easily return the entire source XML by removing the
where clause, or you could add additional filters to the where clause to return additional elements of the
source XML tree.
Until the creation of LINQ (and LINQ to XML), the only approach a developer had for modifying an
XML tree was what you might call ??????in-place??™??™ modification, whereby the XML was loaded into a data
store such as the DOM, where it was then manipulated and modified. LINQ to XML provides this type
of XML modification by letting developers modify XML documents in place.
For the following examples, open your favorite text editor and paste in the results of the previous
example (shown here), and save it as Employees2.xml in the \Wrox\Chapter5 directory.


Scott

555 Main St.
Wellington
FL
33414

All Things Techy
02/05/2007
M


The following code loads the XML document you just created, creates a new element and appends it to
the source XML, and then saves the modified (new) XML document to a different file:
155
Part II: LINQ to XML
XmlDocument xdoc = new XmlDocument();
xdoc.


Pages:
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6