␡
- The rfc822 Module
- A Simple DTD for E-mail
- An Example of an E-mail Message in XML
- Processing a Eudora Mailbox
- Processing a Linux Mailbox
- Processing an E-mail Message by Using the rfc822 Module
- Sending E-mail by Using xMail
- Source Code for the SendxMail Application
- Source Code for the xMail Application
This chapter is from the book
14.2 | A Simple DTD for E-mail
Before going any further with parsing Linux or Eudora mailboxes, we need to settle on an XML representation of a mailbox. We will use the following simple DTD.
CD-ROM reference=14003.txt <!-- XMail = A simple DTD for a collection of e-mail messages An xMail file consists of zero or more message elements. A message has a headers element that contains fields such as from, to, subject, and so on. The body element houses the text of the e-mail --> <!ELEMENT xmail (message)*> <!ELEMENT message (headers,body)> <!ELEMENT headers (field)+> <!ELEMENT field (name,value)> <!ELEMENT name (#PCDATA)> <!ELEMENT value (#PCDATA)> <!ELEMENT body (#PCDATA)>