Jump to content

Images in XML to XHTML


kvnmck18

Recommended Posts

I created an XML file that has pictures in it, how can I take those images byusing a XML parser to load in XHTML? It seems like it should be simple...I hope someone can help...Thanks
Link to comment
Share on other sites

What do you mean you store pictures in XML? References to puctures, simmilarly in XHTML's <img> element? If so, then simply learn (and use) XSLT for this (and any other type of XML-to-otherXMLbased transformations).

Link to comment
Share on other sites

Where on w3schools.com does it talk about that? I've been trying a bunch of different things. I just end up getting a text version of the image (images/image.jpg)

Link to comment
Share on other sites

Well I do have one way I got to work using xsl but it just seems like there should be an easier way. But it works so I won't complain.

Link to comment
Share on other sites

  • 4 months later...
Guest onggiadzit
I created an XML file that has pictures in it, how can I take those images byusing a XML parser to load in XHTML? It seems like it should be simple...I hope someone can help...Thanks
I have similar question, I want to display an image in html and the image src is in the xml.Here are my files:--------------xml-------------<?xml version="1.0" encoding="utf-8"?><player> <name>maria Doe</name> <picture>maria.jpg</picture> <residence>Tustin, CA</residence></player>---------------- html -------<html><body><xml id="cdcat" src="maria.xml"></xml><table border="1" datasrc="#cdcat"><tr><td><span datafld="name"></span></td><td><span datafld="residence"></span></td><!---- here is the problem, don't know the syntax for it ----><td><img border="0" src="'picture'" width="160" height="120"></span></td><!--------------------------></tr></table></body></html>HELP!
Link to comment
Share on other sites

Hmmm.... what was I thinking when I first posted this. Use XSLT.... with your XML.I could explain more if you post an example of your XML... and get you rollin' with it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...