Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nsiOrganization>
- <oos:regNumber></oos:regNumber>
- <oos:shortName></oos:shortName>
- <oos:fullName></oos:fullName>
- <oos:factualAddress>
- <oos:OKATO></oos:OKATO>
- <oos:addressLine></oos:addressLine>
- <oos:building></oos:building>
- <oos:country>
- <oos:countryCode></oos:countryCode>
- <oos:countryFullName></oos:countryFullName>
- </oos:country>
- ...
- ...
- ...
- ...
- ...
- </nsiOrganization>
- <nsiOrganization>
- ...
- ...
- ...
- ...
- ...
- </nsiOrganization>
- ...
- ...
- ...
- ...
- ...
- // Загружаем xml файл
- XDocument xDoc = XDocument.Load("C:/myXml.xml");
- // делим на части
- XElement[] xmls = xDoc.Root.Elements().ToArray();
- for (int i = 0; i < xmls.Length; i++)
- {
- // Записываем каждый элемент в разные файл (ну или в базу)
- using (var file = File.CreateText(string.Format("xml{0}.xml", i + 1)))
- {
- file.Write(xmls[i].ToString());
- }
Add Comment
Please, Sign In to add comment