![]() |
| Sponsored Links (We share ad revenue): |
|
|
Re: Image in xml |
|
Super Moderator
![]() Posts: 10,642
Location: Blackpool. UK
|
it's never going to be easy when you first start with XML.
An image could be referenced in exactly the same way everything else is and it just become another node in the document. Are you using XSL & XSLT (Transforms) to display the XML in the browser?
__________________
Chris. ->> Links are advertising NOT optimising!! <<- Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System |
|
|
|
|
|
Re: Image in xml |
|
Weightlifting CS Student
Posts: 480
Name: Nick Ohrn
|
Depending on what your XML file looks like, you'll probably want to do an XSL transform as you bring the XML file into your web page, as chrishirst said. Fortunately, XSLT shouldn't take you more than 3-4 hours to get the basics down. If you're processing XML documents you've probably run into XPath and that's how you'll retrieve items to manipulate in you XSLT document.
For example, given the following XML file: Code:
<!-- Standard XML header and parent nodes... --> <Image> <URI>http://example.com/image.png</URI> </Image> <!-- Finish the item --> Code:
\\Item\Image\URL Code:
<img src="{.\Image\URI} />
__________________
NickOhrn.com - My personal haven of insight to offer the world. Plugin-Developer.com - Custom plugin development to fit your needs. Plugins available for WordPress and Drupal, among others. |
|
|
|
| Sponsored Links (We share ad revenue): |
| Thread Tools | |
|
|
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |