Linq to XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shapper

    Linq to XML

    Hello,

    I am using LINQ to select records from a SQL database.
    How can I create a XML file from it?

    Thanks,
    Miguel
  • Madhur

    #2
    Re: Linq to XML

    shapper wrote:
    Hello,
    >
    I am using LINQ to select records from a SQL database.
    How can I create a XML file from it?
    >
    Thanks,
    Miguel
    Hint.. Use a LINQ query statement with (nested) XElement in the select
    clause.

    Hope this helps.

    --
    Madhur




    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: Linq to XML

      If the underlying data source is a SQL Server database, then it might be
      better to use SQL Server's ability to transform result sets into XML.

      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m

      "Madhur" <madhur_ahuja@N OSPAMyahoo.comw rote in message
      news:OZ0dhKqdIH A.3772@TK2MSFTN GP05.phx.gbl...
      shapper wrote:
      >Hello,
      >>
      >I am using LINQ to select records from a SQL database.
      >How can I create a XML file from it?
      >>
      >Thanks,
      >Miguel
      >
      Hint.. Use a LINQ query statement with (nested) XElement in the select
      clause.
      >
      Hope this helps.
      >
      --
      Madhur
      >

      >

      Comment

      Working...