Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB.NET
Hi
I am trying to convert xml document to CSV file by node value for e.g
 
this is my sample xml file
 
<account>
   <feild1>aaaaa</feild1>
   <feild2>aaaaa</feild2>
   <feild3>aaaaa</feild3>
   <feild4>aaaaa</feild4>
<products>
  <product>
    <feild1>bbbb</feild1>
    <feild2>bbbb</feild2>
    <feild3>bbbb</feild3>
    <feild4>bbbb</feild4>
  </product>
</products>
<persons>
  <person>
    <feild1>cccccc</feild1>
    <feild2>cccccc</feild2>
    <feild3>cccccc</feild3>
    <feild4>cccccc</feild4>
  </person>
</persons>
</account>
 

 
i need to display the output in excel as
 

account aaaa aaaa aaaa  aaaa 
product bbbb bbbb bbbb  bbbb
person  cccc cccc cccc  cccc
 
as a CSV File
Posted 25-Jan-13 5:08am
Edited 25-Jan-13 15:38pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Sergey Alexandrovich Kryukov at 25-Jan-13 10:33am
   
One of the approaches, a 5.
I would first question why doing it at all. It's getting from data some less-of-date; and what's next?
—SA
Marcus Kramer at 25-Jan-13 12:13pm
   
+5 for the approach as well.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

So what have you tried so far. We're not going to do your homework for you. Show us code snippets where you have problems and we'll be happy to help.
The reason we don't do homework for you: Compliments of JSOP[^]
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 25-Jan-13 10:31am
   
Right, tell them! A 5.
—SA
Marcus Kramer at 25-Jan-13 12:13pm
   
Thanks, Sergey
keerthi23 at 25-Jan-13 11:43am
   
off course i know nobody wants to do others home work. i will put my code i did so far.
BYW thanks sergey
Sergey Alexandrovich Kryukov at 25-Jan-13 12:28pm
   
Marcus, not Sergey :-)
Make sure you put you code with "Improve question"...
—SA
keerthi23 at 25-Jan-13 12:30pm
   
sorry i will put that now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.150326.1 | Last Updated 25 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100