<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx</link><description>[Blog Map] Data-bound content controls are a powerful and convenient way to separate the semantic business data from the markup of an Open XML document. After binding content controls to custom XML, you can query the document for the business data by</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Oliver Bell&amp;#8217;s Weblog  &amp;raquo; Blog Archive   &amp;raquo; Eric White has too much to say!</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9014283</link><pubDate>Fri, 24 Oct 2008 09:42:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9014283</guid><dc:creator>Oliver Bell&amp;#8217;s Weblog  &amp;raquo; Blog Archive   &amp;raquo; Eric White has too much to say!</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://osrin.net/2008/10/eric-white-has-too-much-to-say/"&gt;http://osrin.net/2008/10/eric-white-has-too-much-to-say/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Miscellaneous links for Halloween</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9027313</link><pubDate>Sat, 01 Nov 2008 00:00:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9027313</guid><dc:creator>Doug Mahugh</dc:creator><description>&lt;p&gt;Stephen McGibbon has screenshots of the Open XML and ODF support coming in Windows 7 Wordpad , as announced&lt;/p&gt;
</description></item><item><title>[Open XML] Liens de la semaine 03/11/08</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9033219</link><pubDate>Mon, 03 Nov 2008 17:10:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9033219</guid><dc:creator>Julien Chable</dc:creator><description>&lt;p&gt;Suite &amp;#224; la PDC 2008 et au workshop Open XML donn&amp;#233; par Microsoft &amp;#224; Redmond ( Doug , encore mille excuses&lt;/p&gt;
</description></item><item><title>re: Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9164599</link><pubDate>Tue, 02 Dec 2008 17:05:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9164599</guid><dc:creator>Sondre</dc:creator><description>&lt;p&gt;Question regarding the GetTextFromContentControl method in your example. This looks for &amp;quot;p&amp;quot; elements and there is normally (as far as I've seen) no &amp;quot;p&amp;quot; tags within the &amp;quot;sdt&amp;quot; elements, which is the parameter into the method.&lt;/p&gt;
&lt;p&gt;Looking at some of my own Open XML documents, it looks like the following example would be more correct. Yet, this example does not support placeholders that allows carriage returns.&lt;/p&gt;
&lt;p&gt;e.Element(w + &amp;quot;sdtContent&amp;quot;).Element(w + &amp;quot;r&amp;quot;).Element(w + &amp;quot;t&amp;quot;).Value.Trim()&lt;/p&gt;
&lt;p&gt;Additionally the code will fail whenever there is placeholders that does not have any tag specified, to avoid this you can make a check in the foreach loops, something like:&lt;/p&gt;
&lt;p&gt;if (sdt.Element(w + &amp;quot;sdtPr&amp;quot;).Element(w + &amp;quot;tag&amp;quot;) != null)&lt;/p&gt;
&lt;p&gt;Thanks for a great example!&lt;/p&gt;
</description></item><item><title>re: Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9340345</link><pubDate>Mon, 19 Jan 2009 19:57:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9340345</guid><dc:creator>Ryan Riley</dc:creator><description>&lt;p&gt;I just read Brian Jones' &amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/brian_jones/archive/2009/01/05/taking-advantage-of-bound-content-controls.aspx&amp;quot;"&gt;http://blogs.msdn.com/brian_jones/archive/2009/01/05/taking-advantage-of-bound-content-controls.aspx&amp;quot;&lt;/a&gt; title=&amp;quot;Taking Advantage of Bound Content Controls&amp;quot;&amp;gt;post&amp;lt;/a&amp;gt; where he completely swaps out the custom XML part. The code appears much more concise, but does it lack in the area of property reconstructing the Custom XML Part Properties?&lt;/p&gt;
</description></item><item><title>re: Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML</title><link>http://blogs.msdn.com/ericwhite/archive/2008/10/19/creating-data-bound-content-controls-using-the-open-xml-sdk-and-linq-to-xml.aspx#9914698</link><pubDate>Thu, 29 Oct 2009 13:22:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9914698</guid><dc:creator>satchi</dc:creator><description>&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;Can we do the custom binding for content controls that are in header and footer parts?&lt;/p&gt;
</description></item></channel></rss>