home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_ReadXMLfromaFile_snippet_142737_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  1KB  |  39 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Read XML from a File Using the XmlTextReader</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Uses the XMLTextReader class to extract the contents from an XML file.</Description>
  8.       <Keywords>
  9.       </Keywords>
  10.       <Shortcut>xmlReadTxt</Shortcut>
  11.     </Header>
  12.     <Snippet>
  13.       <References>
  14.         <Reference>
  15.           <Assembly>System.Xml.dll</Assembly>
  16.           <Version />
  17.           <Url />
  18.         </Reference>
  19.       </References>
  20.       <Imports>
  21.         <Import>
  22.           <Namespace>System.Xml</Namespace>
  23.         </Import>
  24.       </Imports>
  25.       <Declarations>
  26.         <Literal>
  27.           <ID>filename</ID>
  28.           <Type>String</Type>
  29.           <ToolTip>Replace with the name of the file that contains the XML.</ToolTip>
  30.           <Default>"Snippet.xml"</Default>
  31.         </Literal>
  32.       </Declarations>
  33.       <Code Language="VB" Kind="method body"><![CDATA[Dim reader As New XmlTextReader($filename$)
  34. Dim contents As String
  35.  
  36. contents = reader.ReadInnerXML]]></Code>
  37.     </Snippet>
  38.   </CodeSnippet>
  39. </CodeSnippets>