How to merge RTF with data ?

  • Thread starter Thread starter brandon
  • Start date Start date
B

brandon

I have an RTF-file with 'placeholders' and these placeholders
must be filled with external data (by an C#-application).

What is the 'best' way to accomplish this ? I could, of course,
write a plain 'search-and-replace'-routine, but I gues there
are better ways (xsl ?).

I've already google'd on it, but have not found anything useful
yet. Who can point me in the right direction ?
 
Hi Brandon,

Take a look at the RegEx class (Regular Expressions) on MSDN. You can
use several methods to figure out which patterns to replace with which
values such as XML, flat file / ini, or ADO for database. Once you
figure out who you want to address the "replace what with what" logic,
then RegEx is probably your most efficient means of assigning the values
with a pattern search, especially with smaller RTF or HTML documents.

(watch for wrapping in the url)
http://msdn.microsoft.com/library/d...stemTextRegularExpressionsRegexClassTopic.asp

Hope this helps.
- Glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top