Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML in netscape 7

Status
Not open for further replies.

scroce

MIS
Joined
Nov 30, 2000
Messages
780
Location
US
I'm wondering why something relatively simple doesn't function in netscape 7

As I understand it, netscape7 has an xml parser. so why doesn't this file work? (see below)

All it does is provide a form that is bound to a simple xml file. It should allow the user of this page to see the data about books contained in the xml file it is bound to.

However - when I call it up in Netscape 7, the fields are blank.

Can someone offer some tips as to what's different, or maybe refer me to some good reading that addresses differences in IE and NS xml

Code:
<html>
<head>
<title>Data Binding Sample Thingy</title>
</head>
<body>
<XML id=xmlData src=&quot;booklistMINE.xml&quot;></XML>
<h1>Navigating the Booklist XML Files</h1>
<table border=&quot;1&quot; borderColor=&quot;maroon&quot; cellPadding=&quot;1&quot; cellSpacing=&quot;1&quot; width=&quot;75%&quot;>
	<tr bgColor=&quot;#999999&quot;>
		<td><font color=&quot;maroon&quot; size=&quot;2&quot;>Title</font></td>
		<td><input dataFld=&quot;title&quot; dataSrc=&quot;#xmlData&quot; style=&quot;Height: 22px WIDTH: 286px&quot;></td>

	</tr>
	<tr bgColor=&quot;#999999&quot;>
		<td><font color=&quot;darkred&quot; size=&quot;2&quot;>Quantity</font></td>
		<td><input dataFld=&quot;quantity&quot; dataSrc=&quot;#xmlData&quot; style=&quot;Height: 22px WIDTH: 286px&quot;></td>
	</tr>
	<tr bgColor=&quot;#999999&quot;>
		<td><font color=&quot;maroon&quot; size=&quot;2&quot;>ISBN</font></td>
		<td><input dataFld=&quot;ISBN&quot; dataSrc=&quot;#xmlData&quot; style=&quot;Height: 22px WIDTH: 286px&quot;></td>

	</tr>
</table>
<input id=&quot;button1&quot; name=&quot;button1&quot; onClick=&quot;xmlData.recordset.moveFirst()&quot; type=&quot;button&quot; value=&quot;First&quot;>
<input id=&quot;button2&quot; name=&quot;button2&quot; onClick=&quot;if(xmlData.recordset.absoluteposition>1)xmlData.recordset.movePrevious()&quot; type=&quot;button&quot; value=&quot;<&quot;>
<input id=&quot;button3&quot; name=&quot;button3&quot; onClick=&quot;if(xmlData.recordset.absoluteposition<xmlData.recordset.recordcount)xmlData.recordset.moveNext()&quot; type=&quot;button&quot; value=&quot;>&quot;>
<input id=&quot;button4&quot; name=&quot;button4&quot; type=&quot;button&quot; value=&quot;Last&quot; onClick=&quot;xmlData.recordset.moveLast()&quot;>
</body>
</html>

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
the problem is you are trying to use functionality designed for microsoft for use in ie browsers, not sticking to w3.org specifications. (tut, tut)

dataSrc=&quot;#xmlData&quot;
will only work in ie.

simon
 
aha - thank you. So then is there a decent reference on the web that you know of which provides w3.org compliant xml examples?

I'm really new to XML, and I'm trying to determine whether or not it's something worth pursuing on the websites that I manage.

I am a nobody, and nobody is perfect; therefore, I am perfect.
 
Some example code can be found at



the xml I use on my sites is parsed using server side code.

support for xml is improving but certain 'main' modern browsers (ie5 on a mac, an no, they aren't going ot make anymore versions), won't support xml.

Just as dhtml / css / javascript development is held back by obsolete browsers, so is xml client code.

hth

simon

ps - dont stop playing though - ive created really fast sites, with fantastic nav menu's and context menus, limitless content without refresh, using xml, only problem is - they only work in ie!!! :o(
 
thanks simon. I appreciate the input. trying to code for two separate browsers really takes a lot of my time. I'm a one man shop who has to support several relatively uncomplicated websites, b/c they have to work decently in both both netscape and ie

would it be possible for you to post some of the xml sites you referenced with that have the &quot;limitless content without refresh&quot; so that I can get an idea of the possibilities. If you can't that's ok. just thought I'd ask.


I am a nobody, and nobody is perfect; therefore, I am perfect.
 
I would love to you give access to the sites, I am very proud of them, but they aren't open to the net :o(, because of the browser incompatability issues, it just isn't possible, I do use them in admin pages, where I can control browser requirements.

As for coding for different browsers, firstly, stick to w3 guideslines, using nn7.1 / mozilla 1.5 / ie 6 etc should be fairly easy.

have a look at this thread I started - it might help.

thread215-772925

simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top