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_IteratetheNodesinanXMLFile_snippet_142734_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2008-09-17  |  1KB  |  41 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>Iterate named nodes in XML document</Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Iterates the elements in an XML document by element name.</Description>
  8.       <Shortcut>xmlIter</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <References>
  12.         <Reference>
  13.           <Assembly>System.XML.dll</Assembly>
  14.           <Url />
  15.         </Reference>
  16.       </References>
  17.       <Imports>
  18.         <Import>
  19.           <Namespace>System.Xml</Namespace>
  20.         </Import>
  21.       </Imports>
  22.       <Declarations>
  23.         <Literal>
  24.           <ID>TagName</ID>
  25.           <Type>String</Type>
  26.           <ToolTip>Replace with the name of the element (not the entire XPath).</ToolTip>
  27.           <Default>"ElementName"</Default>
  28.         </Literal>
  29.         <Object>
  30.           <ID>XmlVariable</ID>
  31.           <Type>XmlDocument</Type>
  32.           <ToolTip>Replace with an XmlDocument variable.</ToolTip>
  33.           <Default>xmlDoc</Default>
  34.         </Object>
  35.       </Declarations>
  36.       <Code Language="VB" Kind="method body"><![CDATA[For Each node As XmlNode In $xmlVariable$.GetElementsByTagName($TagName$)
  37.  
  38.         Next]]></Code>
  39.     </Snippet>
  40.   </CodeSnippet>
  41. </CodeSnippets>