I need to write a Java method that will:
- retrieve HTML from a data table
- search the HTML for a specific marker (embedded within a comment)
- replace that marker with more HTML
For example, The original HTML could have a page header, the marker and a page footer. I would want to get that HTML and replace the marker with page content, like a blog posting.
My main concerns are speed and functionality. Since the original HTML and the HTML to be injected into the original HTML could be quite large, I need some advice.
I know I could use Strings and use String.replace(), but I'm concerned about the size limitations of a String and how fast that would perform.
I'm also thinking about using the Reader/Writer objects, but I don't know if that would be faster or not.
I know there is a Java Clob object, but I don’t really see if it can be used for my particular situation.
Any ideas/advice would be welcome.
Thanks,
Tim
