<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Retrieve browser-enabled form as XML</title><link>https://www.infopathdev.com:443/forums/thread/18600.aspx</link><pubDate>Wed, 18 Oct 2006 09:40:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18600</guid><dc:creator>hurtlingturtle</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18600.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18600</wfw:commentRss><description>Use the following code:&lt;br /&gt;&lt;br /&gt;            SPSite site = new SPSite("http://" + _serverName);&lt;br /&gt;            SPWeb web = site.OpenWeb();&lt;br /&gt;            SPListItem listItem = web.GetListItem("http://" + _serverName + _formLocation);&lt;br /&gt;            String fileXML = listItem.Xml;&lt;br /&gt;&lt;br /&gt;hope this helps</description></item><item><title>Retrieve browser-enabled form as XML</title><link>https://www.infopathdev.com:443/forums/thread/18500.aspx</link><pubDate>Wed, 04 Oct 2006 15:22:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18500</guid><dc:creator>David Dean</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18500.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18500</wfw:commentRss><description>I am trying to use a URL request (via WebRequest.Create) to programmatically retrieve an InfoPath XML document from a document library using the following VB code:&lt;br /&gt;&lt;br /&gt;Dim formXml As String = ""&lt;br /&gt;Dim req As WebRequest = WebRequest.Create("http://server/doclib/file.xml")&lt;br /&gt;req.Credentials = CredentialCache.DefaultNetworkCredentials&lt;br /&gt;req.Method = "GET"&lt;br /&gt;&lt;br /&gt;Dim resp As WebResponse = req.GetResponse()&lt;br /&gt;Using s As Stream = resp.GetResponseStream(), sr As New StreamReader(s)&lt;br /&gt;    formXml = sr.ReadToEnd()&lt;br /&gt;End Using&lt;br /&gt;&lt;br /&gt;This works as long as the form template is not browser-enabled. However, if the form template is browser-enabled and the document library is set to "Display as a web page", the request always returns the HTML generated by Forms Services.&lt;br /&gt;&lt;br /&gt;Is there an alternate way to programmatically retrieve the actual XML for the document without using the SharePoint web services or object model?&lt;br /&gt;</description></item></channel></rss>