I want to be able to insert a subset of xml from one dom document into another…Normally you would use the insertNode method, so as to avoid the “wrong document” excpetion when doing this. There is no such method in script…what gives??
Subject: Where is the insertNode method in script
The InsertBefore method is a DOM Level 2 binding – it’s not part of the DOM Level 3 specification. Is it super-handy and friendly? Yep, no doubt. But Lotus went with the Level 3 (current) specification, so there’s no InsertBefore in the NotesDOMNode class. (InsertAfter was never part of the spec, ever.)
Subject: RE: Where is the insertNode method in script
Stan,
Sorry…I was referring to importNode method. I need to bring in a subset of one dom tree into another one…When i create a doc fragment from the target node and try to append it to the source document, i get a “Wrong Document” error…
Subject: RE: Where is the insertNode method in script
Again, that’s not a W3C DOM Level 3 binding:
http://www.w3.org/TR/DOM-Level-3-Core/
Note that only ECMAScript and Java bindings are codified by the W3C (and links to those bindings are included in the core reference home page), but that in order to be compliant with DOM3, equivalent members in other languages should match. LotusScript has no NotesDOMxxxxx methods that are not DOM3-compliant.