Posted by Jim Higson on 09/26/05 17:03
Paul Wheeler wrote:
> Well i am trying to put in data that can be updated by just sending 1 file
> instead of retyping my index.html file. i have seen a unoffical way of
> linking a xml doc to a html file using the code <xml id="name"
> src="name.xml"> it is looks like what i want but i can not get it to load
> on to the page i am trying to add it too. can any one help.. and yes i am
> teaching my self.
If retyping a HTML file is the problem then scripting is probably the
answer. Languages such as PHP specialise in generating the HTML for you.
You can convert XML files to XHTML (or any other XML-derived format) using
XSL, but it can be quite difficult to learn. PHP is probably easier and
usually comes with an XML parser which you can use to read your XML file
and output HTML. This (X)HTML is then sent to the browser.
Generally, XML other than XHTML shouldn't be sent to the browser unless
you're coding an AJAX app (if you don't know you are you're not). XML
itself has no rules how the browser should display it.
There are many good books available on PHP, and many websites with
introductions. This is probably where you should go next.
Jim
Navigation:
[Reply to this message]
|