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