Use visitor pattern to render the structure