XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 12th, 2001, 01:13 PM
chris.tns chris.tns is offline
Unauthorized User ;)
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: the Armpit of modern Civilization
Posts: 9 chris.tns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to chris.tns Send a message via Yahoo to chris.tns
ok i am using a php script which calls an html template, in the html template the script dynamically populates an xml data island....
i like the way xml translates into html with a minimum of coding required, but is there anyway to pull an html link from the xml...ive tried a couple ways calling them all like so:
<td>
<span datafld="href"></span>
<span datafld="label"></span></a>
</td>

here is the segment of the data island i am using

<link>
<label>Link Text</label>
<href><a href=this.html></href>
</link>

-or-

<href><a href=this.html></href>

-or-

<href><![CDATA[<a href=this.html>]]></href>

and everytime i returns the full string in place instead of turning it into the proper html tag......how do you work around this?? is it possible to embed html tags in xml or is there another way to put the dynamic content into an html link???

thanks in advance

Reply With Quote
  #2  
Old February 27th, 2004, 07:54 PM
majelbstoat's Avatar
majelbstoat majelbstoat is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Manchester, England
Posts: 39 majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 h 4 m 46 sec
Reputation Power: 11
<UPDATE> Ha! This was posted 3 years ago! Don't suppose you're still having the problem are you?
I've used a data island with html tags in it before:

This displays a picture and some information from a gallery of pictures. Buttons underneath call Javascript which selects the next or previous PHOTO node.

Basically, the HTML tags aren't embedded inside the XML, they are described in the HTML file itself, with the XML providing only the data that fills the tags, (which I think is the correct separation of formatting versus data).

example.htm:

Code:
<html>
<head>
<xml src="photoalbum.xml" id="xmldso" async="false"></xml>
</head>
<body>
<p>
Title:
<span datasrc="#xmldso" datafld="TITLE"></span>
</p>
<p>
Description:<br />
<span datasrc="#xmldso" datafld="DESCRIPTION"></span>
</p>
<a datasrc="#xmldso" datafld="IMAGE" target="_blank">
<img alt="Click For Large Version" datasrc="#xmldso" datafld="THUMBNAIL" border="0"></img>
</a>

... Buttons to move forward and back through the xml tree.

</body>
</html>


example.xml:

Code:
<PHOTO_ALBUM>
  <PHOTO>
    <TITLE>Picture Title</TITLE>
    <DESCRIPTION>Picture Description</DESCRIPTION>
    <THUMBNAIL>Picture TN.jpg</THUMBNAIL>
    <IMAGE>Picture.jpg</IMAGE>
    <CATEGORY>My Category</CATEGORY>
  </PHOTO>
</PHOTO_ALBUM>


Everybody feel free to comment on this if it's wrong, as I'm new at XML myself! Hope this helps,

Jamie.
__________________
Practise Random Kindness

Last edited by majelbstoat : February 27th, 2004 at 07:58 PM.

Reply With Quote
  #3  
Old March 2nd, 2004, 12:18 PM
khwang's Avatar
khwang khwang is offline
Über nübe
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Babylon 4
Posts: 240 khwang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 27 sec
Reputation Power: 6
Is that IE specific?
__________________
Hello, old friend...

Reply With Quote
  #4  
Old March 4th, 2004, 03:30 PM
majelbstoat's Avatar
majelbstoat majelbstoat is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Manchester, England
Posts: 39 majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level)majelbstoat User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 h 4 m 46 sec
Reputation Power: 11
Yeah the <XML> tag is IE specific I think. Is there a good, recommended way to do data extraction from an XML source document that is cross-browser compatible?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xml data island transformations


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT