lobecombgeorn
New Member
I have this example of an XML\[code\]<work> <worker name="Jason" job="admin"> <worker name="Frank" job="employee"> <worker name="John" job="admin"><work>\[/code\]I'm trying to retrieve the workers name with the job admin.Here is a part of my current code. This code will retrieve all workers.\[code\]Worker = workerElement.Elements("work") .Elements("worker") .Select(c => (string)c.Attribute("name")) .ToArray();\[/code\]I have been trying out the following solution\[code\]Worker = workerElement.Elements("work") .Elements("worker") .Select(c => (string)c.Attribute("name[@job='admin']")) .ToArray();\[/code\]I want to retrieve all names where the job "title" equals admin.