Getting entire XML content
Another hidden jewel in the new XML api is the ToString method. ToString method has been overwritten in XElement. In Dom W3C api if you were to do ToString, you would end up with object type. However ToString in XElement outputs the XML string itself. It is nice to be able to pull a certain fragment of XML once you have obtained the reference to a particular XElement. Here is a simple example that illustrates the nice feature.