|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I see questions concerning attributes, XML, and XSLT have already been asked; none helped me so far.
Here's what I want to do: I would like to take my XML data and send it through an XSLT style-sheet that will read every node and parse through it's attribute. E.g., PHP Code:
Here's my problem: I can't seem to figure out what XSLT element or function would actually parse through an attribute's value in side of an element. In att="true", I want it to fetch the value true. Thanks for any help! If I didn't make myself clear enough, I'll be more than happy to clarify... |
|
#2
|
|||
|
|||
|
Oh, maybe I should mention this. I already have a stylesheet written, I just need to know how one would implement the aformentioned functionality.
|
|
#3
|
|||
|
|||
|
Well, <xsl:value-of select="@att"/> should get you 'true'. Basically @attribute-name accesses the attribute's value. Use it how you will
. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Parsing a XML Element's Attribute with XSLT |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|