I have thousands of HTML files that are going to be tied into a new system. The new system uses IFrames to display the content in these HTML files. The problem is that most of the these files have hundreds of links within each file, and the TARGET attribute varys from "_SELF" to "_TOP", etc.
The HTML is read into a string using C#, and then outputted within a header/footer scenario inside the IFrames. Ideally, I would like to use that string, do some sort of REGEX detection of those tags, correct them to have a TARGET="_PARENT" Attribute, and then perform the outputting to the IFrame.
All I need from you experts is a way to detect if a tag is a link, detect if it already has a a TARGET attribute, and make sure the TARGET attribute is set to "_Parent" before moving on to the next link in the string.
Looking forward to your answers!
Thanks in advance