Wrox Programmer Forums
|
BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2
This is the forum to discuss the Wrox book Beginning XML, 4th Edition by David Hunter, Jeff Rafter, Joe Fawcett, Eric van der Vlist, Danny Ayers, Jon Duckett, Andrew Watt, Linda McKinnon; ISBN: 9780470114872
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 26th, 2009, 09:55 AM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem displaying images

Thank you for an inspiring book - unfortunately I have been trying without success to define images in my xml file and display with asp.net.
my xml file:
[code]
<store>
<
ourChoiceLot="1001"Title="Dyson DC25 Ball All Floors"
<FONT size=3>
<
picturesrc="<FONT color=#0000ff size=2>
 
Old January 26th, 2009, 12:35 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Can you clarify your XML? It came out rather weirdly in the forum. Wrap it in code tags using the # menu button in the editor.
As an example you could use a format similar to:
Code:
<images>
<image alt="alt text here" title="title text here" height="100px" width="100px" source="http://www.example.com/images/myImage.png"/>
<!-- more image elements -->
</images>
You then just need to specify any other attributes that contain data you'll need when constructing your img element in the web page.
__________________
Joe
http://joe.fawcett.name/
 
Old January 27th, 2009, 05:22 PM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Still Problems

Hi Joe

Many thanks for your quick reply - tried your suggestion but have now following error message 'System.Web.UI.WebControls.XmlDataSourceNodeDescri ptor' does not contain a property with the name 'image.
xml code:
[code]
<store>
<ourChoiceLot="1001"Title="Dyson DC25 Ball All Floors"
<images>
<image alt="Dyson DC25 Ball"source="www.website.403.png">
</images>
asp.net code:
<asp.Image id="imageLabel" runat="server" CSSclass="image" ImageUrl="'<%# Bind ("image") %>'></asp:Image>

Last edited by silvia23; January 27th, 2009 at 05:28 PM.. Reason: code did not display properly
 
Old January 28th, 2009, 04:23 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You will have to give more details of the whole process. You originally asked for a way to represent image data, there are dozens of acceptable versions, you didn't state that it needed to be in a particular format for input into another system.
__________________
Joe
http://joe.fawcett.name/
 
Old January 28th, 2009, 09:26 AM
Registered User
 
Join Date: Aug 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Cool xml images displayed with asp.net

Hi Joe

Sorry should have stated the idea is to have an xml file listing product details for a store which will be displayed with asp.net repeater control and gridview. I have no problems with the controls for all the text but cannot display the images and having checked code for asp.net I think the fault is the way I store the image data in the xml file. The layout is all done via CSS.
I hope this gives you an idea and you are able to come up with a solution - been stuck on this problem now for quite a while but I am new to xml
Your help is much appreciated

Silvia





Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying images chandan121 JSP Basics 0 May 1st, 2008 09:59 PM
Displaying images...... kethireddy435 ASP.NET 2.0 Professional 0 September 16th, 2007 09:25 PM
strange problem with displaying LOB images in JSP BuryBear Pro JSP 1 April 23rd, 2006 03:48 AM
Images not displaying Penn_Clark Dreamweaver (all versions) 3 February 21st, 2006 12:59 PM
Displaying images inbox Classic ASP XML 2 May 4th, 2005 03:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.