I'm looking to automatically alter some HTML via VTL--in this case, insert extra values into HTML elements. For instance, if the core HTML I'm dealing with is
<img src="image.jpg" alt="">
I'd want to be able to dynamically find the alt tag to place text. Now, in most cases this would be very straightforward; you'd do something like
<img src="image.jpg" alt="${altText}">
What I'm interested in is knowing if there's a way to select the alt attribute without having to explicitly define the variable. Can I dynamically create such a variable with Velocity? I don't even particularly care if it defines all alt tags as the same or splits them out per instance.