Hi,
I'm writing a .NET winforms app that serves as an email client. Users can
store message templates. This is done via an XML document for loading and
saving the templates. When the template is loaded, it's displayed in the
message textbox. Currently, this is the end of the XML phase. Now the user
can edit the textbox before sending the message and the content of the
textbox will be sent when the user hits send.
Now to thicken the plot, emails (and templates) can contain "replacables."
For example, I could have %Relevant Product% and before the message is sent,
it will contain, in place of that, the value "Wrench". I'm doing this by
simply calling string.replace several times (once for each replacable). The
list of values is populated every time the application is started (a textfile
is generated by another app which starts the mail client and I parse the
values and place them in a templated list object.)
This "replacables" approach is somewhat limiting. Some replaceables are
built from other replaceables. Example: %Customer Full Name% consists of:
%Customer First Name% %Customer Last Name%
Is there a way to instead, implement an XML based solution? My primary
concern is that once the template is loaded, I have no say as to what
characters my users will type into the textbox of the message so they might
not conform to XML standards. Any thoughts?
Thanks...
-Ben