[thelist] Appending XML object directly to XHTML

Ben Glassman bglassman at gmail.com
Wed Jun 27 14:06:50 CDT 2007


Hi all,

I am working on an Ajax-enabled calendar where click on a link to a php file
with a query string containing an event id initials an ajax request that
returns an XML document that is also valid XHTML 1.0 Strict (same as doctype
of the document). I am trying to structure the calendar in such a way that
the PHP file can use an HTML file as a template so you can update the HTML
that the calendar updates by updating the template file. I was trying to
just take the outermost div element returned in the xml file and append it
directly to the XHTML document that makes the ajax call, but it only seems
to work in Firefox. Anybody else every tried/experienced anything like this?
I'm not even sure if what I'm trying to do is valid because I'm not serving
the XHTML with the xml mimetype for known reasons that it won't render
correctly in a lot of browsers.

A workaround I've found so far is to just loop through the xml div object
with javascript and using the nodename creating elements and their contained
text nodes.

Thanks,

Ben



More information about the thelist mailing list