I've got a node in an XSD that I'd like to modify. I'd like to change the "name" value in this node:
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
However when I try to find that node via this code, I get either no nodes or an error, depending on what I try.
xsdDoc.Descendants("element").Where(x => x.Attribute("name").Value == "NewDataSet").Single().SetAttributeValue("name", "newValue");
Linq To Xsd isn't an option, since it looks like it's open source and that will mean all sorts of red tape (at work).
Is this possible, or am I out of luck?
Related (but not the same): http://stackoverflow.com/questions/331502/linq-to-xml-update-alter-the-nodes-of-an-xml-document