selecting all the columns in a table based on the column headersvalue

Discussion in 'XML' started by yawnmoth, May 25, 2009.

  1. yawnmoth

    yawnmoth Guest

    <table>
    <thead>
    <tr>
    <td>Part #</td>
    <td>Description</td.
    <td>Price</td>
    </tr>
    </thead>
    <tr>
    <td>...</td>
    <td>...</td>
    <td>...</td>
    </tr>
    </table>

    Would it be possible to, using a single query, load every x'th <td> in
    every <tr> after <thead> based on the position of the 'Price' <td> in
    <thead>?
    yawnmoth, May 25, 2009
    #1
    1. Advertising

  2. yawnmoth wrote:
    > <table>
    > <thead>
    > <tr>
    > <td>Part #</td>
    > <td>Description</td.
    > <td>Price</td>
    > </tr>
    > </thead>
    > <tr>
    > <td>...</td>
    > <td>...</td>
    > <td>...</td>
    > </tr>
    > </table>
    >
    > Would it be possible to, using a single query, load every x'th <td> in
    > every <tr> after <thead> based on the position of the 'Price' <td> in
    > <thead>?


    /table/tr/td[position() = count(../../thead/tr[1]/td[. =
    'Price']/preceding-sibling::td) + 1]

    --

    Martin Honnen
    http://msmvps.com/blogs/martin_honnen/
    Martin Honnen, May 25, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. savvy
    Replies:
    1
    Views:
    463
    savvy
    Jan 18, 2006
  2. Jacksm
    Replies:
    2
    Views:
    839
    Paul Chalekian
    Nov 21, 2006
  3. news.microsoft.com

    hiding columns in gird based on column values

    news.microsoft.com, Oct 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    323
    Mark Rae [MVP]
    Oct 25, 2007
  4. Replies:
    2
    Views:
    90
    Anno Siegel
    Jan 18, 2005
  5. Replies:
    0
    Views:
    94
Loading...

Share This Page