Jump to content
Xtreme .Net Talk

Search the Community

Showing results for tags 'linq'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • New Member at Xtreme .Net Talk?
    • Meet and Greet
    • Announcements
  • .NET
    • General
    • Windows Forms
    • ASP.NET
    • Directory / File IO / Registry
    • Database / XML / Reporting
    • Network
    • Graphics and Multimedia
    • Interoperation / Office Integration
    • Deployment
    • Regular Expressions
    • Syntax Specific
  • Knowledge Base
    • Tutors Corner
    • Code Library
    • Quick Tips
  • Xtreme .Net Talk Members Area
    • Water Cooler
    • Suggestions, Bugs, and Comments

Blogs

There are no results to display.

Categories

  • Code Samples
  • Tutorials & Guides
  • Articles
  • Code Downloads

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


Visual Studio .NET Version


.NET Preferred Language


Skype


Facebook


Twitter ( X )

Found 1 result

  1. Hi all, I'm trying to retrieve some specific data from an XML file I have attached. The data is in <LinkCollection> I have a semi populated class object that contains an ID that directly relates to the LinkItem ID. Matching these values I then want to populate the rest of the class with the other data - Path, Index and any DescriptiveText held under that ID. My attempt is here but I'm returning dodgy string values and getting nowhere slowly. //gets icon path and index foreach (LinkItem item in linkItems) { var Index = from LinkIcon in xmlDoc.Descendants("LinkIcon") where (string)LinkIcon.Parent.Attribute("ID") == item.LinkID select LinkIcon.Attribute("Index").Value; item.IconIndex = Index.ToString(); var Path = from LinkCollection in xmlDoc.Descendants("LinkItem") where LinkCollection.Attribute("ID").Value == item.LinkID select LinkCollection.Descendants("LinkIcon").Attributes("Path"); item.IconPath = Path.ToString(); } example.txt
×
×
  • Create New...