AJAX Forums

XML won't work help me please !?

This is a discussion on XML won't work help me please !? within the XML and XSLT forums, part of the Beginners AJAX category; Ok as far as I know everything should work fine but it doesn't Here is the xml code to the file: <?xml version="1.0" encoding=&...


Go Back   AJAX Forums > Beginners AJAX > XML and XSLT

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Old 11-20-2007, 01:03 PM   #1 (permalink)
Junior Member
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 matt t is on a distinguished road
XML won't work help me please !?

Ok as far as I know everything should work fine but it doesn't

Here is the xml code to the file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<first>
<welcome>Welcome to</welcome>
<title>Karen and Matt's Webpage</title>
<wow>Have you ever heard a song on the radio and thought,

"Wow that describes us exactly!"</wow>

<rocky>We are on a Rocky Mountain High</rocky>
<share>we want to share with you</share>
<music>the music that is special to us</music>
</first>

I can view the XML file in a webrower with no problems and I tested the code in a syntax checker and no errors. However when I try to insert the data elements into a table in an HTML file, all I get is a blank page.

HTML code:

<html>
<title>karenandmatt</title>
<head>

</head>
<body>

<xml id ="first" src="website.xml"> </xml>

<table border ="1" datasrc="#website">
<tr>
<td ><span datafld="welcome"></span></td>
</tr>
<tr>
<td><span datafld="title"></span></td>
</tr>
<tr>
<td><span datafld="wow"></span></td>
</tr>
<tr>
<td ><span datafld ="rocky"></span></td>
<tr/>
<tr>
<td><span datafld ="share"></span</td>
</tr>
<tr>
<td><span datafld = "music"></span></td>
</tr>

</table>

</body>
</html>
__________________
matt t is offline   Reply With Quote
Old 11-20-2007, 01:04 PM   #2 (permalink)
Junior Member
 
Join Date: Mar 2007
Posts: 2
Rep Power: 0 David D is on a distinguished road
The xml element for HTML is entirely non-standard and very very badly supported.

If you want to generate a data table using an XML source then you are better off using some server side technology that outputs regular HTML.

Failing that, consider the YUI Data Table widget, which can use an external XML file as its data source.

http://developer.yahoo.com/yui/datatable/

Note, however, that this approach doesn't have a non-JS fallback. So you can say goodbye to support from a lot of clients (including Opera Mini and GoogleBot). Server side is better as it only requires the client to support basic HTML.
__________________
<a href="http://developer.yahoo.com/about"><img src="http://us.dev1.yimg.com/us.yimg.com/i/us/nt/bdg/websrv_120_1.gif" border="0"> </a>
David D is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Why does this xml and html work? Best Helper XML and XSLT 0 11-12-2007 05:03 PM
why won't my HTML code work? mindless wisdom XHTML and CSS 2 05-27-2007 09:57 AM
What's the best way to work with and create xml files? loseweightfree XML and XSLT 2 05-12-2007 03:14 PM
webdesing Freelance work vishwas_aryan777 XHTML and CSS 1 05-08-2007 01:04 PM
ASP.net, Is it necessary to know AJAX to work... vschib Ajax Frameworks 3 03-19-2007 03:35 PM


All times are GMT -4. The time now is 08:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5
Copyright ©2006 - 2008, AJAXwith.com