basic XML based build function