Session06

You are doing a tremendous amount of assembly in this method.  calculating where to insert attributes and then inserting them and re-assembling things afterwards.  It's all a bit overwrought.  It comes of choosing poorly when it comes to how to store the values for the tag name.  What could you do to simplify this method by choosing a different way to store the tag name?