Start here:

<http://www.lmgtfy.com/?q=c%23+read+xml+from+string>




On Tue, Feb 11, 2014 at 8:17 AM, crazy <crazysan...@gmail.com> wrote:

> Dear All,
>
> I am getting below string as XML response from a third party system. How
> can I convert below XML string into Data table?  I need to insert the
> values into datatable.Please suggest some ideas.
>
> string sXml=<?xml version=\"1.0\"
> encoding=\"utf-8\"?>\r\n<AvailabilityResponse xmlns:xsi=\"
> http://www.w3.org/2001/XMLSchema-instance\"; xmlns:xsd=\"
> http://www.w3.org/2001/XMLSchema\"; xmlns=\"
> http://SunHotels.Services.External.SunHotelsIntegrationService.PostGet\";>\r\n
>  <StatusCode>0</StatusCode>\r\n  <RoomTypeAvailabilities>\r\n
>  <RoomTypeAvailability>\r\n      <Date>2014-02-13T00:00:00</Date>\r\n
>  <RoomId>416240</RoomId>\r\n      <Rate>129.0000</Rate>\r\n
>  <Currency>USD</Currency>\r\n      <AvailableUnits>0</AvailableUnits>\r\n
>    <ReleaseDays>0</ReleaseDays>\r\n      <MinimumStay>1</MinimumStay>\r\n
>    <Beds>2</Beds>\r\n      <ExtraBeds>1</ExtraBeds>\r\n
>  <IncludedBoard>Half Board</IncludedBoard>\r\n
>  <AdultBreakfastPrice>0.0000</AdultBreakfastPrice>\r\n
>  <ChildBreakfastPrice>0.0000</ChildBreakfastPrice>\r\n
>  <AdultHalfBoardPrice>0.0000</AdultHalfBoardPrice>\r\n
>  <ChildHalfBoardPrice>0.0000</ChildHalfBoardPrice>\r\n
>  <AdultFullBoardPrice>0.0000</AdultFullBoardPrice>\r\n
>  <ChildFullBoardPrice>0.0000</ChildFullBoardPrice>\r\n
>  <AdultAllBoardsPrice>0.0000</AdultAllBoardsPrice>\r\n
>  <ChildAllBoardsPrice>0.0000</ChildAllBoardsPrice>\r\n
>  <AdultExtrabedPrice xsi:nil=\"true\" />\r\n
>  <ChildExtrabedPrice>37.00</ChildExtrabedPrice>\r\n
>  </RoomTypeAvailability>\r\n    <RoomTypeAvailability>\r\n
>  <Date>2014-02-14T00:00:00</Date>\r\n      <RoomId>416240</RoomId>\r\n
>  <Rate>129.0000</Rate>\r\n      <Currency>USD</Currency>\r\n
>  <AvailableUnits>0</AvailableUnits>\r\n
>  <ReleaseDays>0</ReleaseDays>\r\n      <MinimumStay>1</MinimumStay>\r\n
>  <Beds>2</Beds>\r\n      <ExtraBeds>1</ExtraBeds>\r\n
>  <IncludedBoard>Half Board</IncludedBoard>\r\n
>  <AdultBreakfastPrice>0.0000</AdultBreakfastPrice>\r\n
>  <ChildBreakfastPrice>0.0000</ChildBreakfastPrice>\r\n
>  <AdultHalfBoardPrice>0.0000</AdultHalfBoardPrice>\r\n
>  <ChildHalfBoardPrice>0.0000</ChildHalfBoardPrice>\r\n
>  <AdultFullBoardPrice>0.0000</AdultFullBoardPrice>\r\n
>  <ChildFullBoardPrice>0.0000</ChildFullBoardPrice>\r\n
>  <AdultAllBoardsPrice>0.0000</AdultAllBoardsPrice>\r\n
>  <ChildAllBoardsPrice>0.0000</ChildAllBoardsPrice>\r\n
>  <AdultExtrabedPrice xsi:nil=\"true\" />\r\n
>  <ChildExtrabedPrice>37.00</ChildExtrabedPrice>\r\n
>  </RoomTypeAvailability>\r\n    <RoomTypeAvailability>\r\n
>  <Date>2014-02-15T00:00:00</Date>\r\n      <RoomId>416240</RoomId>\r\n
>  <Rate>129.0000</Rate>\r\n      <Currency>USD</Currency>\r\n
>  <AvailableUnits>0</AvailableUnits>\r\n
>  <ReleaseDays>0</ReleaseDays>\r\n      <MinimumStay>1</MinimumStay>\r\n
>  <Beds>2</Beds>\r\n      <ExtraBeds>1</ExtraBeds>\r\n
>  <IncludedBoard>Half Board</IncludedBoard>\r\n
>  <AdultBreakfastPrice>0.0000</AdultBreakfastPrice>\r\n
>  <ChildBreakfastPrice>0.0000</ChildBreakfastPrice>\r\n
>  <AdultHalfBoardPrice>0.0000</AdultHalfBoardPrice>\r\n
>  <ChildHalfBoardPrice>0.0000</ChildHalfBoardPrice>\r\n
>  <AdultFullBoardPrice>0.0000</AdultFullBoardPrice>\r\n
>  <ChildFullBoardPrice>0.0000</ChildFullBoardPrice>\r\n
>  <AdultAllBoardsPrice>0.0000</AdultAllBoardsPrice>\r\n
>  <ChildAllBoardsPrice>0.0000</ChildAllBoardsPrice>\r\n
>  <AdultExtrabedPrice xsi:nil=\"true\" />\r\n
>  <ChildExtrabedPrice>37.00</ChildExtrabedPrice>\r\n
>  </RoomTypeAvailability>\r\n    <RoomTypeAvailability>\r\n
>  <Date>2014-02-16T00:00:00</Date>\r\n      <RoomId>416240</RoomId>\r\n
>  <Rate>129.0000</Rate>\r\n      <Currency>USD</Currency>\r\n
>  <AvailableUnits>0</AvailableUnits>\r\n
>  <ReleaseDays>0</ReleaseDays>\r\n      <MinimumStay>1</MinimumStay>\r\n
>  <Beds>2</Beds>\r\n      <ExtraBeds>1</ExtraBeds>\r\n
>  <IncludedBoard>Half Board</IncludedBoard>\r\n
>  <AdultBreakfastPrice>0.0000</AdultBreakfastPrice>\r\n
>  <ChildBreakfastPrice>0.0000</ChildBreakfastPrice>\r\n
>  <AdultHalfBoardPrice>0.0000</AdultHalfBoardPrice>\r\n
>  <ChildHalfBoardPrice>0.0000</ChildHalfBoardPrice>\r\n
>  <AdultFullBoardPrice>0.0000</AdultFullBoardPrice>\r\n
>  <ChildFullBoardPrice>0.0000</ChildFullBoardPrice>\r\n
>  <AdultAllBoardsPrice>0.0000</AdultAllBoardsPrice>\r\n
>  <ChildAllBoardsPrice>0.0000</ChildAllBoardsPrice>\r\n
>  <AdultExtrabedPrice xsi:nil=\"true\" />\r\n
>  <ChildExtrabedPrice>37.00</ChildExtrabedPrice>\r\n
>  </RoomTypeAvailability>\r\n    <RoomTypeAvailability>\r\n
>  <Date>2014-02-17T00:00:00</Date>\r\n      <RoomId>416240</RoomId>\r\n
>  <Rate>129.0000</Rate>\r\n      <Currency>USD</Currency>\r\n
>  <AvailableUnits>0</AvailableUnits>\r\n
>  <ReleaseDays>0</ReleaseDays>\r\n      <MinimumStay>1</MinimumStay>\r\n
>  <Beds>2</Beds>\r\n      <ExtraBeds>1</ExtraBeds>\r\n
>  <IncludedBoard>Half Board</IncludedBoard>\r\n
>  <AdultBreakfastPrice>0.0000</AdultBreakfastPrice>\r\n
>  <ChildBreakfastPrice>0.0000</ChildBreakfastPrice>\r\n
>  <AdultHalfBoardPrice>0.0000</AdultHalfBoardPrice>\r\n
>  <ChildHalfBoardPrice>0.0000</ChildHalfBoardPrice>\r\n
>  <AdultFullBoardPrice>0.0000</AdultFullBoardPrice>\r\n
>  <ChildFullBoardPrice>0.0000</ChildFullBoardPrice>\r\n
>  <AdultAllBoardsPrice>0.0000</AdultAllBoardsPrice>\r\n
>  <ChildAllBoardsPrice>0.0000</ChildAllBoardsPrice>\r\n
>  <AdultExtrabedPrice xsi:nil=\"true\" />\r\n
>  <ChildExtrabedPrice>37.00</ChildExtrabedPrice>\r\n
>  </RoomTypeAvailability>\r\n
>  </RoomTypeAvailabilities>\r\n</AvailabilityResponse> "
>
> --
> "People who never make mistakes, never do anything."
>
> dEv
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to dotnetdevelopment@googlegroups.com
> To unsubscribe from this group, send email to
> dotnetdevelopment+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
>
> ---
> You received this message because you are subscribed to the Google Groups
> "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
> Services,.NET Remoting" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dotnetdevelopment+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell

-- 
-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to dotnetdevelopment@googlegroups.com
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

--- 
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dotnetdevelopment+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to