I am creating a xml file, but am unable to convert the string in the tag <Nb>
<Nb>
<Header> <Body> <Nb>13</Nb> </Body> </Header>
How do I convert it to an XElement item? I want to avoid using Linq, XmlDoc if possible...
Try using the XElement.Parse like so
private XElement XmlNumber() { XElement nb = XElement.Parse("<Header><Body><Nb>13</Nb></Body></Header>"); return nb; }
Examples here: How to convert from string to XElement object
Try using the XElement.Parse like so
Examples here: How to convert from string to XElement object