Click here to Skip to main content
15,914,074 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is the XML File....

XML
<Photos>
	<Photo> p1.jpg </Photo>
        <Photo> p2.jpg </Photo>
  	<Photo> p3.jpg </Photo>
  	<Photo> p4.jpg </Photo>
  	<Photo> p5.jpg </Photo>
</Photos>


This is the Output Needed!

p1.jpg
p2.jpg
p3.jpg
p4.jpg
p5.jpg

This is What i have Done so Far!
I dont need to read an external xml file i need to hard code the values and display them in a string list! thats it!

C#
namespace ConsoleApplication2
{
    class CSV
    {
        public List<Photos> ReadPhotosXML()
        {
            List<Photos> Photos = new List<Photos>();
            Photos p = new Photos();
Posted
Updated 30-Jul-13 1:05am
v2
Comments
lukeer 30-Jul-13 5:51am    
Why is that restriction to "using only XElement class"?
If taken seriously, there's nothing to do because you will _always_ need to use something else as well.
Hawkeye101 30-Jul-13 6:02am    
I mean for to handle with the XML file
i need to only use XElement when handling with the XML file!

1 solution

 
Share this answer
 
v2
Comments
Hawkeye101 30-Jul-13 7:04am    
Thanks but i dont need to read an external xml file i need to hard code the values and display them in a string list! thats it!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900