Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. LINQ to XML

LINQ to XML

Scheduled Pinned Locked Moved C#
databasecsharplinqxmlquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Edmundisme
    wrote on last edited by
    #1

    Hello, Is there a way for me to use the cool LINQ syntax to query XML using VS2005? Or do I need VS2008 for that? i.e.: XElement xml = new XElement("contacts", from c in db.Contacts orderby c.ContactId select new XElement("contact", new XAttribute("contactId", c.ContactId), new XElement("firstName", c.FirstName), new XElement("lastName", c.LastName)) ); Thanks!

    J 1 Reply Last reply
    0
    • E Edmundisme

      Hello, Is there a way for me to use the cool LINQ syntax to query XML using VS2005? Or do I need VS2008 for that? i.e.: XElement xml = new XElement("contacts", from c in db.Contacts orderby c.ContactId select new XElement("contact", new XAttribute("contactId", c.ContactId), new XElement("firstName", c.FirstName), new XElement("lastName", c.LastName)) ); Thanks!

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      There isn't a way to access this syntax in VS2005. You need VS2008 (such as the free Express edition) to do that.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messiah's Blessings on the Mountain (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      C E 2 Replies Last reply
      0
      • J Judah Gabriel Himango

        There isn't a way to access this syntax in VS2005. You need VS2008 (such as the free Express edition) to do that.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messiah's Blessings on the Mountain (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        C Offline
        C Offline
        CKnig
        wrote on last edited by
        #3

        To be exact: you need C#3, VB9 and the .net 3.5 framework. All that comes with VS2008.

        1 Reply Last reply
        0
        • J Judah Gabriel Himango

          There isn't a way to access this syntax in VS2005. You need VS2008 (such as the free Express edition) to do that.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messiah's Blessings on the Mountain (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          E Offline
          E Offline
          Edmundisme
          wrote on last edited by
          #4

          Thanks!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups