<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx</link><description>With LINQ to XML, what I have learned so far, it's awesome, it is not only the first class concept of processing XML data, but also let you process a complex XML doc in the most simplest and readable way. I have a project called, Linq.Flickr , and I often</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#6205464</link><pubDate>Tue, 20 May 2008 22:58:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6205464</guid><dc:creator>Adi</dc:creator><author>Adi</author><description>&lt;p&gt;AWESOME!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6205464" width="1" height="1"&gt;</description></item><item><title>REST to collection builder using LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#6048089</link><pubDate>Sun, 30 Mar 2008 08:57:52 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6048089</guid><dc:creator>Mehfuz's WebLog</dc:creator><author>Mehfuz's WebLog</author><description>&lt;p&gt;Few weeks ago, I did a post about how can I handle REST response using LINQ To XML. You can take a look&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6048089" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#6020771</link><pubDate>Mon, 24 Mar 2008 22:12:32 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6020771</guid><dc:creator>mehfuzh</dc:creator><author>mehfuzh</author><description>&lt;p&gt;Hi Rajesh, &lt;/p&gt;
&lt;p&gt;As i have showed in my post that if you want to find nodes under a certain node , &lt;/p&gt;
&lt;p&gt;you can do like&lt;/p&gt;
&lt;p&gt;var query = from control in doc.Decendants(&amp;quot;control&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select new SomeClass&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SomeProperty = control.Element(&amp;quot;Textbox1&amp;quot;).Attribute(&amp;quot;ID&amp;quot;).Value ?? string.Empty.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;This is the simplest form to start with, you can furter do it dynamic by getting all the textbox Element and running a query for each.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6020771" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#6019486</link><pubDate>Mon, 24 Mar 2008 15:46:47 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6019486</guid><dc:creator>Rajesh</dc:creator><author>Rajesh</author><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;I am very new to linq.&lt;/p&gt;
&lt;p&gt;I have xml structure like below&lt;/p&gt;
&lt;p&gt;&amp;lt;Page Name=&amp;quot;Page1&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;Controls&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;TextBox1 ID=&amp;quot;TextBox1&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;rajesh&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;TextBox2 ID=&amp;quot;TextBox2&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;ajay&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;TextBox3 ID=&amp;quot;TextBox3&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;poonam&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;TextBox4 ID=&amp;quot;TextBox4&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;manoj&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;txtpntest1 ID=&amp;quot;txtpntest1&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;txtpntest2 ID=&amp;quot;txtpntest2&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;txtpntest3 ID=&amp;quot;txtpntest3&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.TextBox&amp;quot; ControlData=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;control&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;pnltest ID=&amp;quot;pnltest&amp;quot; ControlType=&amp;quot;System.Web.UI.WebControls.Panel&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/control&amp;gt; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;/Controls&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;DocCollection&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;DocName&amp;gt;&lt;/p&gt;
&lt;p&gt;Purchase order&lt;/p&gt;
&lt;p&gt;&amp;lt;/DocName&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;DocDescription&amp;gt;&lt;/p&gt;
&lt;p&gt;to raise a purchase order&lt;/p&gt;
&lt;p&gt;&amp;lt;/DocDescription&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/DocCollection&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/Page&amp;gt;&lt;/p&gt;
&lt;p&gt;i have business entity class which has three property&lt;/p&gt;
&lt;p&gt;1&amp;gt;Controlcollection of type string&lt;/p&gt;
&lt;p&gt;2&amp;gt;DocDescription of type string&lt;/p&gt;
&lt;p&gt;3&amp;gt;DocName of type string&lt;/p&gt;
&lt;p&gt;what i want is to fill Controlcollection &amp;nbsp;with the data in control collection within Controls node and DocDescription &amp;nbsp;with DocDescription within DocCollection node and DocName with DocName within DocCollection &amp;nbsp;node&lt;/p&gt;
&lt;p&gt;Please help to resolve above issuse&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6019486" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5592493</link><pubDate>Sat, 12 Jan 2008 03:38:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5592493</guid><dc:creator>mehfuzh</dc:creator><author>mehfuzh</author><description>&lt;p&gt;Thanks, kazi, noted!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5592493" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5590798</link><pubDate>Fri, 11 Jan 2008 21:11:42 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5590798</guid><dc:creator>kazimanzurrashid</dc:creator><author>kazimanzurrashid</author><description>&lt;p&gt;Kool, Just remind you one thing MehfuzQ the ApplicationException is no longer recommended, check the following &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/brada/archive/2004/03/25/96251.aspx"&gt;blogs.msdn.com/.../96251.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5590798" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5589729</link><pubDate>Fri, 11 Jan 2008 17:30:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5589729</guid><dc:creator>mehfuzh</dc:creator><author>mehfuzh</author><description>&lt;p&gt;Michael and Denny thanks a lot for your comments, it is my pleasure that you liked it.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5589729" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5589586</link><pubDate>Fri, 11 Jan 2008 17:07:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5589586</guid><dc:creator>Denny Ferrassoli</dc:creator><author>Denny Ferrassoli</author><description>&lt;p&gt;Excellent, I wasn&amp;#39;t aware you could use a rest URL with GetElement. This will make parsing XML much easier. Thanks!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5589586" width="1" height="1"&gt;</description></item><item><title>re: REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5589394</link><pubDate>Fri, 11 Jan 2008 16:35:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5589394</guid><dc:creator>Michael Washington</dc:creator><author>Michael Washington</author><description>&lt;p&gt;Good Linq code example. Thanks&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5589394" width="1" height="1"&gt;</description></item><item><title>REST with LINQ to XML</title><link>http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx#5587999</link><pubDate>Fri, 11 Jan 2008 12:40:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5587999</guid><dc:creator>DotNetKicks.com</dc:creator><author>DotNetKicks.com</author><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5587999" width="1" height="1"&gt;</description></item></channel></rss>