W3C home > Mailing lists > Public > www-html@w3.org > March 2003

Re: Include pieces of code in an HTML file

From: Hannemann, Christopher <christopher_hannemann@merck.com>
Date: Tue, 11 Mar 2003 11:54:31 -0500
To: "'www-html@w3.org'" <www-html@w3.org>
Message-ID: <2F85E92E527FD4118BAF00508B5C761703E61B4E@uswsmx12.merck.com>

I found this old thread and wondered what the conclusion was.  I want to
include an XML stream in my HTML page.

I have created some JavaScript code.  The code can be used by site
developers to create an menu for their site.  The developer needs only
create:
	menu.xml - the data for the menu
	menu.css - the look and feel of the menu

and include my menu.js.

I have javascript to parse the XML and produce the menu. I include the XML
using <iframe src="menu.xml">.

Here is the problem:

I used xmlSrcframe.document.documentElement.innerText to get the XML source
as a string.  This is not supported by Netscape. I see there is innerHTML,
but on IE the browser returns innerHTML as a formatted stream full of divs,
spans, classes, fonts, margins...

Is there a DOM compliant way to get this XML source to the client to be
processed on the client by my JavaScript.  If so users of my menu will not
have to know anything about server side development.

Thanks,

Chris


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================
Received on Tuesday, 11 March 2003 13:04:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:54 GMT