CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    180

    XML Formated Email ?

    XML can do a very cool trick.

    If you include the name of an XSL file in the XML file, you can produce what looks just like a formatted HTML file when you load the XML file into a browser.

    The question I have is this. How would you actually produce an actual HTML file that can be sent as a formated email by using this XML and XSL combo?

    Let me put it another way.

    First of all, consider this. Email has the capacity to send HTML formated text.

    Second of all, consider this. XML along with a stated XSL style sheet can be loaded into a browser to produce an HTML document (right?).

    So can the same be said for an email message? If email is sophisticated to send and html file properly formatted and presented as if it was being viewed in a browser, can it also to the same with an xml file?

    I imagine not. I would imagine that it could not pull off this trick. I imagine that the first order of business would be to use the xml and xsl files to produce the html file and then use that generated html file as the email.

    So what code or tools can be used to produce this html file?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: XML Formated Email ?

    In this case, the problem won't be the formatting of the e-mail message. In fact, you could easily tell any e-mail message what form of text rendering to use. The problem will be the e-mail client. You won't find e-mail clients that render XML+XSL messages.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Dec 2005
    Posts
    180

    Re: XML Formated Email ?

    Quote Originally Posted by PeejAvery View Post
    In this case, the problem won't be the formatting of the e-mail message. In fact, you could easily tell any e-mail message what form of text rendering to use. The problem will be the e-mail client. You won't find e-mail clients that render XML+XSL messages.
    Here is a follow-up question.

    Let's look at the issue backwards going the other direction. Does there exist a tool or a 3rd party program that can take an HTML file and split it up into an XML and XSL file that will effectively display the same thing in a browser than the original HTML file?

    Once I have decided how I want the HTML file to look, is there some sort of tool that will split an HTML document into an XML and XSL file that will display in a browser the same way as the HTML will?

    I imagine that it might be a built-in feature for dreamweaver or some other web authoring tool. It shoule be, I think.

    We masters must want to do this sort of thing from time to time.

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: XML Formated Email ?

    There are tools for HTML to XML, but I haven't seen XSL included in the conversion.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured