cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
710
Views
0
Helpful
1
Replies

c# axl SOAP write data from<index> 1<index>

jmn
Level 1
Level 1

Hi all

I'm writing an application that show speeddials in a Textbox.

here is a part of a axl:

     <speeddial index="1">
          <dirn>00123456</dirn>
          <label>jan Mobiel</label>
          <asciiLabel />
        </speeddial>
        <speeddial index="2">
          <dirn>03123456</dirn>
          <label>Jan Thuis</label>
          <asciiLabel />
        </speeddial>
        <speeddial index="3">
          <dirn>0234567</dirn>
          <label>jAN wERK</label>
          <asciiLabel />
        </speeddial>
      </speeddials>

I'm be able to get some in the textbox bot not only from index=1 or index=2 enz.

can you one help we with this.

Herby olso snip of my code.

           foreach (var item in respdoc.Descendants("speeddial"))
            {

                textBox4.Text = (string)item.Element("dirn");
                textBox5.Text = (string)item.Element("label");

           

}

Thanks

1 Reply 1

stephan.steiner
Spotlight
Spotlight

Wow, you're going old school with this.

Don't you need to look at the descendants of "speeddials" to get the individual speeddial nodes. If memory serves me right, speeddials look like this:

<phone>

..

<speeddials>

<speeddial index ="1">

...

</speeddial>

<speeddial index="2">

..

</speeddial

</speeddials>

</phone>