View Full Version : Reading the values of XML tag attributes
12-02-2002, 05:00 PM
I've been to www.youngpup.net (this guy is brilliant!). Anyways, I was reading some of his content which is in XML files, and noticed that he had a script there somewhere that was able to read and display the value of an attribute in an XML tag. I looked through his source code, and didn't see it, although obviously, it was there somewhere... I just must have missed it.
Anyways, does anyone know of a cross-platform way of reading these attributes?
12-17-2002, 03:33 AM
I'm going to bump this thread, k?
12-17-2002, 12:36 PM
assuming you're talking XSL ...
<xsl:value-of select="node" />
<xsl:value-of select="@attribute" />
You can add node/attribute values into other strings like
I think that's right :o
12-17-2002, 11:58 PM
12-18-2002, 11:29 PM
The getAttribute() method of Element is a DOM Core method; it will work from XML. The key is for the document to recognize your script element in the first place:
// script here
12-19-2002, 07:06 AM
You've been a tremendous help. I appreciate it!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.