This raises the question of how do I then update the 5th occurrence in this unbounded element and save it back to the repository?
Using the MSXML DOM you don’t need to count the number of elements because the IXMLDOMNodeList interface has a length property, e.g
var Party = …
var Address = Party.childNodes ;
var numAddress = Address.length ;
For updating the whole document if using IIS, MSXML DOM there are two options:
- get the whole document instance, make the modifications to the DOM tree and process the whole document back to Tamino. Tamino will do an update (and not an insert) if the root element contains the ino:id attribute.
- use NodeLevelUpdate feature. There’s an excellent FAQ on this feature that can be found here.
example.js (2 KB)