SolvedPrivate

searching with linq

Posted on 2014-02-07
1
56 Views
Last Modified: 2016-02-10
I have the following data.  I need to represent this in code somehow..like a struct, or lookup...dictionary..which ever is the best way...and then be able to find the info with LINQ.  How would I set this up.


<KeyPaths>
            <KeyPath EventType="API" Key="MRC" Path="PRPS/PRP[@KEY='MRC']" />
            <KeyPath EventType="API" Key="ARC" Path="PRPS/PRP[@KEY='ARC']" />
            <KeyPath EventType="API" Key="SCHEDULE_CANCEL"   Path="PRPS/PRP[@KEY='SCHEDULE_CANCEL']" />
            <KeyPath EventType="API" Type="Default" Path="FLDS/FLD[@KEY='{0}']" />
            <KeyPath EventType="DMN" Type="Default" Path="{0}" />
</KeyPaths>
0
Comment
Question by:Robb Hill
1 Comment
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 39842578
public class KeyPath
{
    public string EventType { get; set; }
    public string Key { get; set; }
    public string Type { get; set; }
    public string Path { get; set; }
}

var keyPaths = new List<KeyPath>();

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now