XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
praveen apSubject: XML attribute name
Author: praveen ap
Date: 10 Nov 2008 08:55 AM

Hi,

Is there a way to get the attribute name of a perticular name?

<root>
<element id="" name="" date="" time="" place=""></element>
<element id="" n="" d="" t="" p=""></element>
</root>

So I need to get the values of all the attributes, but i dont want to pass the name of each attribute because the name keeps changing based on some logic.

Is there a way to get the attribute count and based on that i iterate through, may be, a list and get the names?

Thanks in advance
Praveen

Posttop
(Deleted User) Subject: XML attribute name
Author: (Deleted User)
Date: 10 Nov 2008 09:44 AM
Usin XSL, you can iterate over all the attributes by using <xsl:for-each select="/root/item/@*">, and later check on the value returned by the name() function.

Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.