Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL: Accessing XML object attributes

Status
Not open for further replies.

greedyzebra

Technical User
Sep 5, 2001
140
US
It's simple enough to obtain the value contained within an xml tag: <xsl:value-of select="NodeNameToGetTheValueFrom">

My question is how do I access and obtain the value of a tag's attribute. For instance:

<!ELEMENT widget (#PCDATA)>
<!ATTLIST widget
MyAttribute CDATA #REQUIRED>

How can I obtain the value of "MyAttribute"

Thanks!
 
[tt]<xsl:value-of select="@MyAttribute" />[/tt]

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top