IT Community - Software Programming, Web Development and Technical Support

How to load the image in webpage using xml script?

This is a discussion on How to load the image in webpage using xml script? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; How to load the image in webpage using xml script?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-19-2007, 11:38 PM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Question How to load the image in webpage using xml script?

How to load the image in webpage using xml script?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2007, 12:27 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Thumbs up Re: How to load the image in webpage using xml script?

Hi, Here is the Answer for that..

You can insert the path in CDATA section. See the below example in xml script:

XML script
----------
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="Picture.xsl"?>
<images>
<image>
<name>tn1.jpg</name>
<path><![CDATA[E:\Work Area\Ramesh\DWGroups\xmlandxslt\App_Data\Images\tn 1.gif]]></path>
</image>
<image>
<name>tn2.jpg</name>
<path><![CDATA[E:\Work Area\Ramesh\DWGroups\xmlandxslt\App_Data\Images\tn 2.jpg]]></path>
</image>
</images>


You Can select that xml element of a specified node-set using XSL in <xsl:for-each> element
See the below example in xsl script:

XSL script
----------
<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl: output method="html"/>

<xsl: template match="/">
<html>
<body>
<h2>Pictures</h2>
<table border="2" width="200">
<tr>
<th align="left">Name</th>
<th align="left">Path</th>
</tr>
<xsl:for-each select="http://www.discussweb.com/images/image">
<tr>
<td width="100" height="100">
<xsl:value-of select="name"/>
</td>
<td width="100" height="100">
<img src="{path}"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl: template>

</xsl:stylesheet>
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What will be your approach if a particular script in Load Test fails? sundarraja Testing Tools 0 02-01-2008 03:32 AM
What is the use of Load Analyser in load runner? sundarraja Testing Tools 1 09-14-2007 08:10 AM
How can I copy something from a webpage to my webpage? oxygen HTML, CSS and Javascript Coding Techniques 1 07-27-2007 03:51 AM
Design for a business webpage swoosh Web Design Help 3 03-15-2007 02:08 PM
Good Design for a Baby webpage djmix Web Design Help 1 03-09-2007 08:36 PM


All times are GMT -7. The time now is 12:16 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0