Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

I'm tired of XmlDataSource

Back to Forum: Tech Off
  • User profile image
    code001

    are now some days I'm trying to get out would say a rabbit or at least a rat from XmlDataSource hat!

    I have a xml like this (note that some attributes like pinPoint do not appear everywhere):

    <land>
     <iter unde="from here to there 0">
      <landMark km="0.1" behave="goTo">
       <ubi>somewhere010</ubi>
       <quo>somewhere011</quo>
       <how symbol="fwd">going01</how>
      </landMark>
      <landMark km="0.2" behave="keep">
       <ubi>somewhere020</ubi>
       <quo>somewhere021</quo>
       <how symbol="rnd">going02</how>
      </landMark>
     </iter>
     <iter unde="from here to there 1">
      <landMark km="1.0" pinPoint="10" behave="goTo">
       <ubi>somewhere100</ubi>
       <quo>somewhere101</quo>
       <how symbol="fwd10">going10</how>
      </landMark>
      <landMark pinPoint="11" behave="goTo">
       <ubi>somewhere110</ubi>
       <quo>somewhere111</quo>
       <how symbol="fwd11">going11</how>
      </landMark>
     </iter>
     <iter unde="from here to there 2">
      <landMark pinPoint="10" behave="keep">
       <ubi>somewhere200</ubi>
       <quo>somewhere201</quo>
       <how symbol="fwd">going20</how>
      </landMark>
      <landMark pinPoint="11" behave="goTo">
       <ubi>somewhere110</ubi>
       <quo>somewhere111</quo>
       <how symbol="rnd">going21</how>
      </landMark>
     </iter>
    </land>

    If I try to fit it into a GridView or other Data controls I get a lot of troubles

    can anyone explain to me how I succeed in reading tags like <ubi> using XPath inside XmlDataSource.XPath property?

  • User profile image
    littleguru

    Wouldn't that be //ubi or /land/iter/landMark/ubi ?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.