#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    20
    Rep Power
    0

    how to select attribute of a node?


    How do I rewrite code to select an attribute of a node? Is this how I would do it if nick was an attribute of last?

    LastName = Student.selectSingleNode("Last/@nick").text

    Please help

    getchoo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    new york
    Posts
    84
    Rep Power
    13
    <!-- selects the nick attribute of the context node -->
    attribute::nick


    <!-- also, attribute:: can be substituted with @ -->



    <!-- example: -->
    /last[@nick]


    =============
    justin_dago
    =============
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    20
    Rep Power
    0
    Hi

    So is this how I would rewrite it?

    LastName = Student.selectSingleNode("/last[@nick]").text

    getchoo?

IMN logo majestic logo threadwatch logo seochat tools logo