Re: [xmljs-users] deep copy nodes between xml documents with JS
Brought to you by:
djoham,
witchhunter
From: David J. <dj...@ya...> - 2004-12-13 16:14:36
|
> the xmlhttprequest *has* to be there - it's providing lookup data that gets displayed in a form > for editing (think remote procedure calls). There's no reason why you can't use xmlhttprequest and XML for <SCRIPT> at the same time, is there? It should be possible to use xmlhttprequest and simply insert the resulting xml string from the request object into an XML for SCRIPT DOM object. Standardizing on a single DOM Implementation should get you past this and will likely prevent a whole host of other problems later. Since the API of the two dom objects should be pretty much the same, it shouldn't even require much (if any) rework on your part. You could also look into the xmlIO functions of XML for <SCRIPT> to get your XML String from the server and do your RMI. However, if you're using browsers that you know support xmlhttprequest, I'll be the first to admit that object does provide a more robust API and less hoops to jump through. > > As each lookup happens I have to store the previous changes somewhere (the master doc?) and then > post that as one hidden field back to the server for processing. The master doc basically > provides a new root node and some id attributes, ready to be filled with child nodes from the > xmlhttprequest doc. > Again, the master doc should just be an XML for SCRIPT DOM object > now I'm really stuck. any ideas on how I can aggrigate the results of each lookup (ie: add > nodes) to send back to the server in one hidden form field? looks like the data island idea > won't work.... xmlhttprequest should be fine here, as long as you use it just for data retrieval. If you're talking xml data islands (the IE proprietary thing) I think maybe you're making things harder for yourself than you have to. Is there some reason you can't post some simple source code to help us help you out? A very simple recreation that outlines what you're trying to do will go a long way in helping us understand your environment. > > (in panic mode) > Don't panic, find your towel and post some source code :) David |