Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. getting attribute value of an element in xml file [modified]

getting attribute value of an element in xml file [modified]

Scheduled Pinned Locked Moved XML / XSL
xmlhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pradeep kumarappagari
    wrote on last edited by
    #1

    i have a xml file as follows.... now i need to get the attribute "id" value "1234" which is in "performer" by using ASP classic code. please any one help me pleaseeeeeeeeeeeeeee.... Pradeep Reddy -- modified at 3:19 Friday 10th August, 2007

    L X 2 Replies Last reply
    0
    • P pradeep kumarappagari

      i have a xml file as follows.... now i need to get the attribute "id" value "1234" which is in "performer" by using ASP classic code. please any one help me pleaseeeeeeeeeeeeeee.... Pradeep Reddy -- modified at 3:19 Friday 10th August, 2007

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      pradeep kumarappagari wrote:

      by using ASP classic code

      Research MSXML. It is a COM Library that implements XML DOM and is accessible from ASP when properly installed on the machine.

      1 Reply Last reply
      0
      • P pradeep kumarappagari

        i have a xml file as follows.... now i need to get the attribute "id" value "1234" which is in "performer" by using ASP classic code. please any one help me pleaseeeeeeeeeeeeeee.... Pradeep Reddy -- modified at 3:19 Friday 10th August, 2007

        X Offline
        X Offline
        Xmen Real
        wrote on last edited by
        #3

        for C#

        FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
        XmlDocument xmldoc = new XmlDocument();
        xmldoc.Load(fs);
        XmlNodeList xmlnode = xmldoc.GetElementsByTagName("result");
        string id = xmlnode[0].Attributes[0].Value;

        hope this will work

        Becoming Programmer...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups