Use message.getAllNodes(); This will return a String array that you can iterate through. So if your message looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
You could loop through the books like this:
var books = message.getAllNodes('/bookstore/book');
for (var i = 0; i < books.length; i++) {
var bookMessage = qie.parseXMLString(books[i]);
qie.info(bookMessage.getNode('//title') + ' costs this much: $' + bookMessage.getNode('//price'));
var title = bookMessage.getNode('//title');
var price = bookMessage.getNode('//price');
var query = "INSERT INTO BOOKS " +
"(title, price) " +
"VALUES('" + qie.escapeSql(title) + "', " + qie.escapeSql(price) + ")";
qie.doQuery('testDB', query, false);
}
So your channel might look something like this: