Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed LINQ query to read XML file that returns a list
    text
    copied!<p>In this is XML file I have to get all the Source dlls in a list. I am trying with below query.</p> <p>Dim appManifest As String = New System.IO.StreamReader(Application.GetResourceStream(New System.Windows.Resources.StreamResourceInfo(e.Result, Nothing), New Uri("AppManifest.xaml", UriKind.Relative)).Stream).ReadToEnd()</p> <p><strong>Dim deploymentRoot As XElement = XDocument.Parse(appManifest).Root</strong> **Dim parts As List(Of XElement) = (From assemblyParts In _ deploymentRoot.Elements().Elements() Select assemblyParts).ToList()**</p> <p>but patrs contains count.It is not a list. How can I do this?</p> <p>Below is the XML document.</p> <pre><code>&lt;Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" RuntimeVersion="4.0.50826.0"&gt; &lt;Deployment.OutOfBrowserSettings&gt; &lt;OutOfBrowserSettings ShortName="WebPortalUI Application" EnableGPUAcceleration="False" ShowInstallMenuItem="True"&gt; &lt;OutOfBrowserSettings.Blurb&gt; WebPortalUI Application on your desktop; at home, at work or on the go. &lt;/OutOfBrowserSettings.Blurb&gt; &lt;OutOfBrowserSettings.WindowSettings&gt; &lt;WindowSettings Title="WebPortalUI Application" Height="400" Width="928" /&gt; &lt;/OutOfBrowserSettings.WindowSettings&gt; &lt;OutOfBrowserSettings.Icons /&gt; &lt;/OutOfBrowserSettings&gt; &lt;/Deployment.OutOfBrowserSettings&gt; &lt;Deployment.Parts&gt; &lt;AssemblyPart x:Name="WebPortalUI" Source="WebPortalUI.dll" /&gt; &lt;AssemblyPart x:Name="System.ComponentModel.Composition" Source="System.ComponentModel.Composition.dll" /&gt; &lt;AssemblyPart x:Name="System.ComponentModel.Composition.Initialization" Source="System.ComponentModel.Composition.Initialization.dll" /&gt; &lt;AssemblyPart x:Name="System.ComponentModel.DataAnnotations" Source="System.ComponentModel.DataAnnotations.dll" /&gt; &lt;AssemblyPart x:Name="System.Windows.Controls.Data.Input" Source="System.Windows.Controls.Data.Input.dll" /&gt; &lt;AssemblyPart x:Name="System.Windows.Controls.Navigation" Source="System.Windows.Controls.Navigation.dll" /&gt; &lt;AssemblyPart x:Name="System.Xml.Linq" Source="System.Xml.Linq.dll" /&gt; &lt;AssemblyPart x:Name="System.Xml.Serialization" Source="System.Xml.Serialization.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Controls" Source="Telerik.Windows.Controls.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Controls.Docking" Source="Telerik.Windows.Controls.Docking.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Controls.GridView" Source="Telerik.Windows.Controls.GridView.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Controls.Input" Source="Telerik.Windows.Controls.Input.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Controls.Navigation" Source="Telerik.Windows.Controls.Navigation.dll" /&gt; &lt;AssemblyPart x:Name="Telerik.Windows.Data" Source="Telerik.Windows.Data.dll" /&gt; &lt;AssemblyPart x:Name="ViewModel" Source="ViewModel.dll" /&gt; &lt;AssemblyPart x:Name="System.Windows.Data" Source="System.Windows.Data.dll" /&gt; &lt;/Deployment.Parts&gt; &lt;/Deployment&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload