Of course, this works just fine using the built-in methods of XmlDocument (appendChild, createElement).
I am just mildly surprised this does not work with the JQuery methods. On Fri, Aug 29, 2008 at 8:37 PM, Patrick Burrows <[EMAIL PROTECTED]> wrote: > At this point I've tried every combination of .after I could think of. I > think, at this point, this is simply not possible using JQuery. > > On Fri, Aug 29, 2008 at 7:50 PM, Patrick <[EMAIL PROTECTED]> wrote: > >> >> Is anyone aware of a simple example which appends a node to an >> existing XmlDocument? >> >> I am successfully able to update an XmlDocument using the attr() >> method. So: >> >> $(xmlElement).attr("Name","new name"); >> >> I am even able to create new attributes using this method. >> >> What I would like to be able to do now is create a new child element >> of that same xmlElement. I have tried using the after() and >> insertAfter() methods: >> >> $(xmlElement).after("<item ItemId='" + newId + "'></item>"); >> >> but this does not update the main XmlDocument. I can tell this by >> using FireBug's dirxml() output display. So if I do: >> >> console.dirxml(myXmlDoc); >> $(xmlElement).after("<item ItemId='" + newId + "'></item>"); >> console.dirxml(myXmlDoc); >> >> the outputs are exactly the same. >> >> Can anyone shed some light on this issue? Thanks. >> > > > > -- > -- > Patrick Burrows > http://www.CleverHumans.com > -- -- Patrick Burrows http://www.CleverHumans.com