Using href after pulling data from xml file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Using href after pulling data from xml file

  1. #1
    Join Date
    Jun 2007
    Posts
    1

    Using href after pulling data from xml file

    Aloha I am relatively new to Xml. I am using xslt and using the value of function to pull data from my xml file. I need the value to be the href of a link.

    ie

    xml file element
    <link>test.cfm</link>

    gets read into xsl:value-of="link"

    <a href="<xsl:value-of="link" />"> ...more ..... </a>

    More should then be linked to test.cfm

    mahalo,
    brew

  2. #2
    Join Date
    Dec 2004
    Posts
    32
    You're either going to have to use an attribute value template or the explicit attribute creation mechanism.

    Attribute value template:
    <a href="{link}"> ...more ..... </a>

    Attribute creation mechanism:
    <a>
    <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
    ...more .....
    </a>

Similar Threads

  1. web service to store data in XML file
    By raewyn in forum XML
    Replies: 1
    Last Post: 11-28-2005, 04:07 PM
  2. Why use XML?
    By Brian in forum XML
    Replies: 5
    Last Post: 01-10-2003, 08:39 PM
  3. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM
  4. Ado using Data Link File Question
    By KENHOW in forum VB Classic
    Replies: 0
    Last Post: 07-13-2001, 04:02 PM
  5. Re: sending binary data with XML - update
    By Joar Vatnaland in forum XML
    Replies: 0
    Last Post: 05-18-2001, 04:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center