A generic NodeList build in c++