Ok so a Web Service I am connecting to is returning an XMLNode.

How do I get to it using LINQ?

 

I am horribly new to (and at times afraid of) XML.

 

I understand the format and can read them with my eyeballs.

I'm just not very comfortable with the whole voodoo of it all when it comes
to C# and XML and LINQ.

 

So here is the format of the XML.

 

<Lead Id="123456">

            <Fields>

                        <Field FieldId="1" Value="Fred" FieldTitle="First
Name" FieldType="Text"/>

                        <Field FieldId="2" Value="Flintstone"
FieldTitle="Last Name" FieldType="Text" />

                        <Field FieldId="3" Value="555-555-5555"
FieldTitle="Day/Work Phone" FieldType="Phone" />

            </Fields>

</Lead> 

 

 

L123WebService.ClientService WS = new L360WebService.ClientService();

XmlNode L123Data = WS.GetLead(username, password, leadNumber));

string myData = l360Data.InnerXml;

XmlDocument xDoc = new XmlDocument();

xDoc.LoadXml(myData);

 

But have no real clue as to how to go about getting a collection of the
nodes named Field.

 

Once I get the collection I can read through them and get the value based on
the FieldTitle.

 

If someone can help me, I will toast to you (screen name or real name, your
choice) the next time I drink one of my wife's homemade beers. 

 

Thanks to all!

Greg 

Reply via email to