Advertisement

03.13.2008 at 09:03AM PDT, ID: 23239010
[x]
Attachment Details

Querying XML file using LINq

Asked by hijiki7777 in Language Integrated Query - LINQ, Extensible Markup Language (XML)

I have the following XML file.
I want to query this XML file to retreive the name attribute of the Group Element, given a Microsite name.
How do I do this in LINq?
Is LINq the best way to do this?
Nice and easy, although I cannot find a link on Google to do this.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
<?xml version="1.0" encoding="utf-8" ?>
<MicrositeGroups>
    <Group name="M1">
        <Microsite>AIG</Microsite>
        <Microsite>Cofunds</Microsite>
        <Microsite>FriendsProvident</Microsite>
        <Microsite>FundsNetwork</Microsite>
        <Microsite>Hansard</Microsite>
    </Group>
    <Group name="M2">
        <Microsite>Skandia</Microsite>
        <Microsite>StandardLife</Microsite>
        <Microsite>StandardLifeWrap</Microsite>
        <Microsite>Winterthur</Microsite>
        <Microsite>Zurich</Microsite>
    </Group>
</MicrositeGroups>
[+][-]03.13.2008 at 10:25AM PDT, ID: 21118557

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 11:00AM PDT, ID: 21118937

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 04:18PM PDT, ID: 21121740

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 02:04AM PDT, ID: 21123823

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 02:15AM PDT, ID: 21123857

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 02:30AM PDT, ID: 21123921

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 02:59AM PDT, ID: 21124033

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.14.2008 at 04:18PM PDT, ID: 21130458

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.19.2008 at 07:15AM PDT, ID: 21161766

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.19.2008 at 03:45PM PDT, ID: 21166669

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 05:43AM PDT, ID: 21170636

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Language Integrated Query - LINQ, Extensible Markup Language (XML)
Sign Up Now!
Solution Provided By: primeMover2004
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628