[thelist] Appending XML object directly to XHTML

liorean liorean at gmail.com
Wed Jun 27 14:28:33 CDT 2007


On 27/06/07, Ben Glassman <bglassman at gmail.com> wrote:
> 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.

Try one of these:
<uri:http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Core-Document-importNode>
<uri:http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Document3-adoptNode>
-- 
David "liorean" Andersson



More information about the thelist mailing list