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 element [modified]

getting element [modified]

Scheduled Pinned Locked Moved XML / XSL
questionxml
6 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.
  • R Offline
    R Offline
    RussBus
    wrote on last edited by
    #1

    I am looking to get the following information from my XML: TestColumID Assignment Delta System.Double OutputColumn Single Adherence Delta ReportDatabaseColumnAttribute If I want to print ColumnID (not the value, but the word ColumnID) from my XML tags how do I do that? -- modified at 18:36 Thursday 25th October, 2007

    G P 2 Replies Last reply
    0
    • R RussBus

      I am looking to get the following information from my XML: TestColumID Assignment Delta System.Double OutputColumn Single Adherence Delta ReportDatabaseColumnAttribute If I want to print ColumnID (not the value, but the word ColumnID) from my XML tags how do I do that? -- modified at 18:36 Thursday 25th October, 2007

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      How are you parsing the XML?

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      R 1 Reply Last reply
      0
      • G George L Jackson

        How are you parsing the XML?

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        R Offline
        R Offline
        RussBus
        wrote on last edited by
        #3

        With XSL: Just a simple for-each attribute and then I try to us a value-of.

        1 Reply Last reply
        0
        • R RussBus

          I am looking to get the following information from my XML: TestColumID Assignment Delta System.Double OutputColumn Single Adherence Delta ReportDatabaseColumnAttribute If I want to print ColumnID (not the value, but the word ColumnID) from my XML tags how do I do that? -- modified at 18:36 Thursday 25th October, 2007

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          The XPath name() function returns the name of the current element.

          Paul Marfleet

          R 1 Reply Last reply
          0
          • P pmarfleet

            The XPath name() function returns the name of the current element.

            Paul Marfleet

            R Offline
            R Offline
            RussBus
            wrote on last edited by
            #5

            Thats my code and all I get back is 'attribute'

            G 1 Reply Last reply
            0
            • R RussBus

              Thats my code and all I get back is 'attribute'

              G Offline
              G Offline
              George L Jackson
              wrote on last edited by
              #6

              Your context node is attribute; thus, you're printing its name. You want to print out the children elements name. It you just want to print out the first child's name: Given this XML document: TestColumID Assignment Delta System.Double OutputColumn Single Adherence Delta ReportDatabaseColumnAttribute here is an example of what you are trying to do except it prints out all children names:

              "We make a living by what we get, we make a life by what we give." --Winston Churchill

              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