Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: XML links

  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    96
    Thanks
    11
    Thanked 0 Times in 0 Posts

    XML links

    Hi,

    I'm a complete novice to xml, so please forgive a daft question!

    I have the following item, which I want to put a link around, how do I do this?!

    <item>
    <img_name><?=$file_name?></img_name>
    <img_no><?=$counter?></img_no>
    <timecode><?=$hour?>:<?=$minute?>:<?=$second?></timecode>
    <img><?=$media_path?><?=$file_name?></img>
    </item>

    I tried this but it doesn't work:

    <item>
    <img_name><?=$file_name?></img_name>
    <img_no><?=$counter?></img_no>
    <timecode><?=$hour?>:<?=$minute?>:<?=$second?></timecode>
    <a href=""><img><?=$media_path?><?=$file_name?></img></a>
    </item>

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    What language is this? It looks a little like PHP, but I'm rusty with that.

    If it is PHP, you probably want to make sure it's going through the PHP processor.

    Also, how are you presenting this data to the user? As raw XML? Through a XSLT transformation? An AJAX call (XMLHttpRequest)? Or some other method? If it's raw XML, you'll want to use the XLink specification and namespace.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    I guess this belong to php forum.

    http://www.php.net/manual/en/languag...ax.phpmode.php

    Short tags (example three) are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if php was configured with the --enable-short-tags option.
    Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.
    Edit: put your code between [ code] and [ /code] tags, please

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •