Email conversation
From | Dan |
To | Me |
Subject | import XML data files to HTML |
Date | 16 October 2004 14:01 |
Attachment | Existing page that he is using |
Hello Sirs,
I have discovered a solution to import XML data files to HTML.
http://www.howtocreate.co.uk/jslibs/script-importxml
http://www.howtocreate.co.uk/emails/JDDeutschendorf.html#buildget
This XML importing script will take the feeds and will import to HTM file.
This script support all browsers.
But my problem is how could I call it from the page? I must have on the
.htm the following command : $$keyword$$ in order to show search listing on
the page. As you have said I can call it with
[his_page].php?Keywords=$$keyword$$
my xsl file is located at:
[path_to_xsl_file].xsl
How could I modify this script?
I have read on the site that to support (Internet) Explorer 5 on Mac, the
XML file should use a stylesheet:
<?xml-stylesheet type="text/css" href="blank.css"?>
Although that stylesheet could in fact be completely empty. Failure to do
this will produce errors when you try to manipulate the DOM of the XML file.
How configure this script?
to test search querie [his_page]
How to paste the script in the page? I send you a template.
Dan
From | Me |
To | Dan |
Subject | Re: import XML data files to HTML |
Date | 19 October 2004 18:33 |
> But my problem is how could I call it from the page?
Instructions are givin in the source code of the JS file:
http://www.howtocreate.co.uk/jslibs/importxml.js
> my xsl file is located at:
The script does not use XSL, since XSL has very poor browser support.
The stylesheet file it needs for IE 5 Mac is a CSS file, not XSL.
The script relies on you to write the JavaScript DOM scripting to parse the
XML and convert into HTML. The demonstration on
http://www.howtocreate.co.uk/tutorials/jsexamples/importingXML.html
should show you how to use the script to interpret XML, and produce the
HTML output.
This script is quite advanced, so you should only attempt this if you are
already familiar with how to use JavaScript and the W3C DOM. All the script
does is load an XML file, and provide your script with a DOM interface to
the XML document.
If you do not know enough to use the script, I suggest you use my tutorial
(the last few sections are particularly important as they cover how to use
the W3C DOM):
http://www.howtocreate.co.uk/tutorials/javascript/important
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/