I have the following content in my XML file:
<SOAP:Body>
<si:myId>
43h4b-12s22-gj3ls
</si:myId>
</SOAP:Body>
What I want to do is extracting the name of the XML tag as a whole (ex: "<si:myId>").
However, I can not achieve that with C#. The maximum that I can do is to extract the "LocalName", which is "myId" as shown in the example below:
foreach(var element in xDocument.Descendants())
{
string name = element.Name.LocalName; // ex: myId
}
I would be very happy if you would help me to get the tag with full name (ex: "si:myId").