Parse Loads an XML document from a string containing XML. Can optionally
preserve whitespace.
Remove Removes the current node from its parent.
RemoveAll Removes all nodes and attributes from the current element.
RemoveAttributes Removes all attributes from the current element.
RemoveNodes Removes all nodes from the XML document or current element.
ReplaceAll Replaces all child nodes and attributes of the current element with the
specified content.
ReplaceAttributes Replaces all the attributes of the current element with the specified
content.
Save Serializes the current element??™s XML tree to any of several destinations,
such as a file, XmlTextWriter, XmlWriter, or TextWriter.
SetAttributeValue Sets the value of the current attribute.
SetElementValue Sets the value of a child element.
SetValue Sets the value of the current element.
WriteTo Writes the current element to an XmlWriter.
These are powerful yet easy-to-use methods. You??™ll use several of them in this chapter??™s examples. For
instance, you can use the CreateReader method to load an XML tree into an XmlReader, like this:
XElement employees = null;
employee = XElement.
Pages:
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192