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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Posts
    434
    Thanks
    7
    Thanked 3 Times in 3 Posts

    how to add image to each item in feed ?

    I have been trying to add an image but so far all I have been able to do is add the image as media using the <enclosure> method, but this causing the xml to fail validation. I have since then found out that this is for mp3 and not images. so been using the wrong method all along.

    What I wish to do is add an image to each and every <item> in the feed.

    How do I do this ?

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,220
    Thanks
    23
    Thanked 606 Times in 605 Posts
    xml is for transferring text. an image can not be transferred in it. But you can send the url of the image and use that to retrieve the image. Problem I see with that is enormously high band-widths.

    Next thought was to transfer image into ascii code like they did in the old emails. I did find this article http://www.codeproject.com/Articles/...in-an-XML-File. Good luck.

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Quote Originally Posted by sunfighter View Post
    an image can not be transferred in it.
    What about SVG?
    "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

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,220
    Thanks
    23
    Thanked 606 Times in 605 Posts
    Possible Alex anything as long as it's text should work. I just have never done it. So can not say for real.


  •  

    Posting Permissions

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