P. 1
LINQ to XML Overview

LINQ to XML Overview

|Views: 1,050|Likes:
Published by Sreenivasarao

More info:

Published by: Sreenivasarao on Aug 27, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/12/2012

pdf

text

original

If you want to delete an attribute you can use Remove or use SetAttribute(XName, object)

passing null as

the value of object. For example to delete the type attribute from the first phone using Remove.

contact.Elements("phone").First().Attribute("type").Remove();

Or using SetAttribute:

contact.Elements("phone").First().SetAttribute("type", null);

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->