Hello and sorry if question is strange and sorry for bad english. My code:
xws.OmitXmlDeclaration = true;
using (XmlWriter xw = XmlWriter.Create(sb, xws))
{
string lb = "\r\n";
XElement I11 = new XElement("I11", lb,
new XElement("I11_TIPAS", "2"), lb,
new XElement("I11_PAV", "pav"), lb,
new XElement("I11_KODAS_IS", "985"), lb,
from iseip in eip
select new XElement("I12", lb,
new XElement("DI12_BAR_KODAS", iseip.DI12_BAR_KODAS), lb,
new XElement("I12_KODAS_SS", iseip.I12_KODAS_SS), lb,
new XElement("I12_KIEKIS", iseip.I12_KIEKIS), lb,
new XElement("I12_FRAKCIJA", iseip.I12_FRAKCIJA), lb), lb
);
I11.Save(xw);
}
System.IO.File.WriteAllText("bbb.eip", sb.ToString());
Output:
Need get like this:
Problem every I12 node must be in new line. Where is problem?