Create a Data-Driven Messaging System: XML 1.0: Store App Messages in an XML File: Listing 1

The Messages.xml file contains the various messages for the application. Each message can contain a combination of MessageID, MessageName and MessageNumber to uniquely identify each. All messages for your application belong in this XML file.

<?xml version="1.0" standalone="yes"?>
<Messages>
  <Message>
    <MessageID>1</MessageID>
    <MessageName>MainMessage</MessageName>
    <MessageNumber>1</MessageNumber>
    <ClassName>frmMain</ClassName>
    <Message> An error has occurred on this main form...
    </Message>
  </Message>
  <Message>
    <MessageID>2</MessageID>
    <MessageName>MainMessage</MessageName>
    <MessageNumber>2</MessageNumber>
    <ClassName />
    <Message> We are sorry, but the data you have...</Message>
  </Message>
  <Message>
    <MessageID>3</MessageID>
    <MessageName>MainMessage</MessageName>
    <MessageNumber />
    <ClassName />
    <Message>Sometimes things happen. A serious ...</Message>
  </Message>
  ...
  ...
</Messages>
comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.