I want to insert an attribute in every xml node. As xml is changed every time some developer do a change so I want to retrieve xml node path dynamically first and then insert the attribute in it. Any idea how can I have a dynamic path of an xml instead of passing a absolute path.
I want to have the following piece of code in t-sql..As i want to perform the same thing in SQL instead of any .net or other applications
XElement loadedXML = XElement.Load("test.xml");
//filter all nodes
XElement procXML;
procXML = new XElement("Tree",
from el in loadedXML.Descendants("Node")
where (string)el.Attribute("ItemGUID") == currentNodeGUID
select el);
something like this in sql