We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,555 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Storing images in a XML file.

Hi,

I created an XML file that will hold the latest news and stories, and trying to display it now in my HTML file using Javscript (I scrapped XSLT, as it altered the CSS styling and alignments compared to the other pages and couldn't work my way around that).

So, my question, is it possible to store an image link in the XML file then use Javascript to bring it up in the HTML page?

I tried a few resources but none have worked.
If you have a few spare moments, please help! :)

Thanks in advance.

3
Contributors
5
Replies
1 Year
Discussion Span
1 Year Ago
Last Updated
6
Views
Naggelos
Light Poster
30 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I understand XML doesn't read binary. So if i convert the image with a Base64 encoder and place that in my XML file. Is there a way I can have javascript (or XML) decode it and display it using javascript (in a table).

But I basically just want to store the link of the image in the XML, and then have Javascript take that link from the XML file and display it on the HTML. Should be pretty straight forward, but have played with it a lot and nothing has worked!

Please help!

Naggelos
Light Poster
30 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

call me via icq 567877710

xml_looser
Junior Poster
180 posts since Apr 2009
Reputation Points: 16
Solved Threads: 21
Skill Endorsements: 0

call me via icq 567877710

I don't use ICQ, do you have skype?

Naggelos
Light Poster
30 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

have installed it, and added you

Naggelos
Light Poster
30 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I need to know how to do this as well. I need to bring in an image using javascript form the xml file that has the url or location of the image. How do I do this?

ajcoder
Newbie Poster
17 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.5663 seconds using 2.69MB