title: How to use XmlData attribute in VB
body: <p>I'm running into some challenges with getting the syntax correct for XmlData in VB.</p>
  
  <p>This is OK:</p>
  
  <p>&lt;Test()&gt; _<br>
  &lt;XmlData("//data")&gt; _</p>
  
  <p>But I want to add either FilePath or ResourcePath:</p>
  
  <p>&lt;Test()&gt; _<br>
  &lt;XmlData("//data", ResourcePath = "Data.xml")&gt; _</p>
  
  <p>&lt;Test()&gt; _<br>
  &lt;XmlData("//data", FilePath = "Data.xml")&gt; _</p>
  
  <p>VS displays "Name 'ResourcePath' not declared.</p>
  
  <p>VS Intellisense shows 8 parameters. If I write the XmlData attribute like this:</p>
  
  <p>&lt;Test()&gt; _<br>
  &lt;XmlData("//data", , , , "Data.xml", , ,)&gt; _</p>
  
  <p>VS complains 'Too many arguments to 'Public Sub New (ItemPath As String)''</p>
  
  <p>You'll note that in this error message VS shows there is only ONE parameter expected.</p>
  
  <p>However, if you type &lt;XmlData( - VS shows list of EIGHT parameters are expected.</p>
  
  <p>Ed</p>