473,372 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

XML with hyperlink

KL
I am totally new to XML and confused as heck. I have my xml file and want
one of my elements to be a website. Heck I even named the element website
(I know real original), but I can't make the website show as a valid
hyperlink in my html file. Any suggestions on what I am missing??

--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 20 '05 #1
6 4834
KL wrote:
I am totally new to XML and confused as heck. I have my xml file and want
one of my elements to be a website. Heck I even named the element
website (I know real original), but I can't make the website show as a
valid hyperlink in my html file. Any suggestions on what I am missing??


Your message is missing any indication as to how you are trying to transform
your XML into (X)HTML.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2
KL
David Dorward wrote:
KL wrote:
I am totally new to XML and confused as heck. I have my xml file
and want one of my elements to be a website. Heck I even named the
element website (I know real original), but I can't make the website
show as a valid hyperlink in my html file. Any suggestions on what
I am missing??


Your message is missing any indication as to how you are trying to
transform your XML into (X)HTML.

I am linking to the XML file in my HTML file:

<html>
<head>
<title>RPG's</title>
</head>

<body>
<xml id="rpg" src="games.xml"></xml>

<table border="10" bordercolordark="#330066" bordercolorlight="#9900FF"
cellpadding="3">
<tr><td colspan="3" align="center" width="825" height="325"><img
id="picture" datasrc="#rpg" datafld="pic"></img></td></tr>
<tr><td colspan="3" align="center"><div id="name" datasrc="#rpg"
datafld="name"></div></td></tr>
<tr><td colspan="3" align="center"><span id="website" datasrc="#rpg"
datafld="website"></span></td></tr>
<tr><td align="center"><div id="character" datasrc="#rpg"
datafld="char"></div></td>
<td align="center"><div id="race" datasrc="#rpg" datafld="race"></div></td>
<td align="center"><div id="job" datasrc="#rpg"
datafld="job"></div></td></tr>
</table>
<br>
<br>
<table border="0">
<tr><td align="center" width="825"><button
onClick="rpg.recordset.moveFirst()">&lt;&lt; First Record</button>
<button onClick="rpg.recordset.movePrevious(); if (rpg.recordset.BOF)
rpg.recordset.moveFirst()">&nbsp;&nbsp;&lt; Previous
Record&nbsp;&nbsp;</button>
<button onClick="rpg.recordset.moveNext(); if (rpg.recordset.EOF)
rpg.recordset.moveLast()">&nbsp;&nbsp;Next Record&gt;&nbsp;&nbsp;</button>
<button onClick="rpg.recordset.moveLast()">&nbsp;&nbsp;Las t
Record&gt;&gt;&nbsp;&nbsp;</button></td></tr>
</body>

</html>

Hope this makes sense.
--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 20 '05 #3
It was somewhere outside Barstow when "KL" <kl*******@aohell.com>
wrote:
I am linking to the XML file in my HTML file: <xml id="rpg" src="games.xml"></xml> <tr><td colspan="3" align="center" width="825" height="325"><img
id="picture" datasrc="#rpg" datafld="pic">


Why do you think this "datasrc" and "datafld" rubbish will help ?

Out of sheer curiosity, which obsolete M$oft textbook were you reading
when you saw this ? It never worked right, it never worked outside
M$oft, and it's a bad idea for all sorts of reasons. I know many
people have been misled down this dead-end before, but you're the
first I've seen in a few years.

Do it with XSLT, on the server. If you need a book (you will, XSLT is
complex), then I'd recommend Michael Kay's.

You can also do it client-side, but there are serious portability
issues with that.

Jul 20 '05 #4
KL
Andy Dingley wrote:
It was somewhere outside Barstow when "KL" <kl*******@aohell.com>
wrote:
I am linking to the XML file in my HTML file:

<xml id="rpg" src="games.xml"></xml>

<tr><td colspan="3" align="center" width="825" height="325"><img
id="picture" datasrc="#rpg" datafld="pic">


Why do you think this "datasrc" and "datafld" rubbish will help ?

Out of sheer curiosity, which obsolete M$oft textbook were you reading
when you saw this ? It never worked right, it never worked outside
M$oft, and it's a bad idea for all sorts of reasons. I know many
people have been misled down this dead-end before, but you're the
first I've seen in a few years.

Do it with XSLT, on the server. If you need a book (you will, XSLT is
complex), then I'd recommend Michael Kay's.

You can also do it client-side, but there are serious portability
issues with that.

Well, it is part of the college class that I am taking. Needless to say, it
is extremely aggravating that I can't get it to work. But the book on XML
said to use that datasrc and datafld. We are to make the XML database,
which I did fine, and them link it into an HTML file with buttons to go from
previous to last. I can't get it to do the hyperlink. If I could figure
out what I am doing wrong, or how to approach it, I think I could figure it
out.
--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 20 '05 #5
It was somewhere outside Barstow when "KL" <kl*******@aohell.com>
wrote:
Well, it is part of the college class that I am taking.
Change college ?
Needless to say, it
is extremely aggravating that I can't get it to work. But the book on XML
said to use that datasrc and datafld.


Yeah, well it's wrong.

W R O N G

Jul 20 '05 #6
It was somewhere outside Barstow when "KL" <kl*******@aohell.com>
wrote:
I am linking to the XML file in my HTML file:


I appreciate my brief comments in the other post might not be so
helpful.

Google this newsgroup and you'll see past critiques of why DSO is a
poor way to use XML.
<http://groups.google.co.uk/gr************************************************ *********************@codesmiths.com&lr=&hl=en>
Equally styling XML with CSS alone is a bad idea. It may work, but
it's very inflexible (Google c.i.w.a.h for why)
As an alternative, then for commercial web work you really need to use
a server-side XSLT transform into "plain" HTML. This works on all
client devices and it's the only really practical approach.
For intranets, or as "bells and whistles" teaching exercises, then you
can use IE-specific techniques like data islands. These use XSLT on
the client side.

Use some JavaScript like this, called from the onload event.:
document.all.divDest.innerHTML
= xmlSource.transformNode (xslStylesheet);

and HTML like this :

<html>

[...]

<body>

<div id="divDest" >This gets over-written by the XML transformed
content</div>

<xml id="xmlSource" src="games.xml"></xml>
<xml id="xslStylesheet" src="games_to_html_content.xsl"></xml>

</body>
</html>

You can still use the Next/Prev buttons, just pass an ID into the
stylesheet as a parameter. You'll find the MSXML SDK (downloadable
from M$oft) has a useful help file with code examples.
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Badboy36 | last post by:
Hello user from googlegroups, i made a microsoft access database with front and backend. i created the backend in microsoft access97. for the frontend i made two versions (one for microsoft...
0
by: Ryan Harvey | last post by:
Hi all, I have written a web user control that contains a repeater control. the ItemTemplate for this control is basically 6 Hyperlinks in a row, that are dynamically allocated one of 7 gif...
5
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below...
9
by: Leon | last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks. <asp:datalist id="DataList1" runat="server" RepeatColumns="4"> <ItemTemplate> <asp:HyperLink id=HyperLink1 ImageUrl=...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
8
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a...
2
by: Andy | last post by:
Hi, This is one of those things I thought should e easy... I'm programatically trying to set the navigateURL property in a hyperlink in the headertemplate of a repeater, but always get the...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
10
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker. Thanks to Adezii's excellent...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.