Hi,
what you are asking is not clear, but let me give you example. and let me know if this is fit in your scenario.
check below code, it will convert your text file content into xml.
string str = "abc|xyz|pqr";
string[] strsplit = str.Split('|');
XDocument xdoc = new XDocument();
XElement root = new XElement("Root");
foreach (var item in strsplit)
{
root.Add(new XElement("item", item));
}
xdoc.Add(root);
Output :(xdoc object content)
<root>
<item>abc</item>
<item>xyz</item>
<item>pqr</item>
</root>
is that fulfill your requirement ?
thanks
-Amit