added an xml flattener similar to the java xml flattener