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. XML+XLST simple simple question

XML+XLST simple simple question

Scheduled Pinned Locked Moved XML / XSL
xmlcsharphtmldatabaselinux
3 Posts 2 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.
  • H Offline
    H Offline
    Herds
    wrote on last edited by
    #1

    Sorry to make my first post something like this, but i'm having one of those 'bang your head against the wall' problems, I usually work with t-sql and only use xml for outputs but today I have to parse a list in c# and output to html. I have had a search but I think as the xml i've been given is badly formed I've had little luck searching. Anyway.... XML: peter jakes pj87 Linux Redhat All, I want to do in xsl is display the text 'Linux' and 'Redhat' by using a name reference.. I can get this text if I use an ordinal number like so... ...this will display 'Linux', great. But I need to use the actual name reference not a number.

    L 1 Reply Last reply
    0
    • H Herds

      Sorry to make my first post something like this, but i'm having one of those 'bang your head against the wall' problems, I usually work with t-sql and only use xml for outputs but today I have to parse a list in c# and output to html. I have had a search but I think as the xml i've been given is badly formed I've had little luck searching. Anyway.... XML: peter jakes pj87 Linux Redhat All, I want to do in xsl is display the text 'Linux' and 'Redhat' by using a name reference.. I can get this text if I use an ordinal number like so... ...this will display 'Linux', great. But I need to use the actual name reference not a number.

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

      Once you have well formed XML rather than what you posted this XPath statement will return the property node in question //data/person/property[@name='System'] A good reference for things like XPath is www.w3schools.com good luck

      led mike

      H 1 Reply Last reply
      0
      • L led mike

        Once you have well formed XML rather than what you posted this XPath statement will return the property node in question //data/person/property[@name='System'] A good reference for things like XPath is www.w3schools.com good luck

        led mike

        H Offline
        H Offline
        Herds
        wrote on last edited by
        #3

        thanks, I actually got there in the end, I did try w3schools first actually but they didn't have an example that fit how I wanted.

        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