SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : XML Technologies :

Previous DiscussionNext Discussion
 transform XML to HTML

How do you transform data from XML file to turn it into HTML <div> element, and also  set the width and height of the <div> based on the data obtained from XML.

Say, the XML file  contains something like:

...
<info>
 <name>BOB </name>
 <divWidth>100<divWidth>
 <divHeight>40<divHeight>
<info>

Thank you

Started By moja on Jun 14, 2007 at 5:17:27 PM

3 Response(s) | Reply

Earlier Replies | Replies 1 to 3 of 3 | Later Replies
brian on Jun 15, 2007 at 1:04:44 AM (# 1)

You would use some xsl to transform the data

there's tags like <xsl:value-of select="divWidth" /> for example so it would look roughly like:

<xsl:template match="info">
  <div style="width:<xsl:value-of select="divWidth" />px;height:<xsl:value-of select="divHeight" />px;">
    <xsl:value-of select="name" />
  </div>
</xsl:template>

This may not be 100% correct but it is roughly the kind of thing you would do. Hope this helps at least.


moja on Sep 1, 2007 at 4:12:46 PM (# 2)

Thanks for the info !


speed on Dec 1, 2007 at 11:23:36 AM (# 3)

i had the same problem.
thanks
speed
http://tech-unite.com/forum/viewtopic.php?f=5&t=10


Earlier Replies | Replies 1 to 3 of 3 | Later Replies

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.