-4

I need help in creating a console application, where I have to get a list of items from a XML document using a server, remote and client. I have already created a XML document

XML document looks like this:

<clothing>
   <pants>Jeans</pants>
   <shirt>T-Shirt</shirt>
   <shoes>Boots</shoes>
</clothing>

Now my question is where do I go from here? I understand the basics but don't know how to proceed with this, any help will be appreciated, thanks.

Yi-Nain Chen
  • 3
  • 1
  • 4
  • Is this a homework question? – tomfanning May 20 '13 at 14:12
  • 1
    MSDN contains some notes on how to [start reading Xml documents](http://msdn.microsoft.com/en-us/library/cc189056.aspx). Also, there is an extensive [tutorial on C# Corner](http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx) on the topic. – O. R. Mapper May 20 '13 at 14:13
  • http://stackoverflow.com/q/55828/62576 – Ken White May 20 '13 at 14:15
  • @tomfanning - its my pre practical so basically to practise before I can do my practical test. – Yi-Nain Chen May 20 '13 at 14:17
  • @tnw not asking how to do the rest of it, just asking where do I go from here? I just need a starting point to work from. – Yi-Nain Chen May 20 '13 at 14:23
  • @Yi-NainChen Like I said, look up examples and documentation. Perhaps Google [C# parse xml](https://www.google.com/search?q=c%23+parse+xml&aq=f&oq=c%23+parse+xml&aqs=chrome.0.57j58j60l3j61.2258j0&sourceid=chrome&ie=UTF-8) and go from there. – tnw May 20 '13 at 14:25

1 Answers1

0

For tips on creating a console application, see How to: Create a C# Console Application. To read an XML file, look into XDocument.Load. There are samples in the XmlDocument documentation that will show you how to get individual elements and attributes from the document.

For client/server communications, it's hard to say. Probably you want something like TcpListener.

That should at least get you a starting place.

Jim Mischel
  • 131,090
  • 20
  • 188
  • 351