How could I convert plain UTF-8 XML to Outlook HTML format ?

Discussion in 'XML' started by Castor Nageur, Oct 14, 2010.

  1. Hi all,

    I have a Unix application which actually mails some plain UTF-8 XML
    text messages.
    Here is one of my XML:

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?
    ><xml><date>10-14-2010</date><someutf8data>々〆〇〈〉《》「ã€ã€Ž</someutf8data></

    xml>

    If I open this XML with IE, I will get the following (indented &
    colored) result:

    http://www.cijoint.fr/cj201010/cijJQyaKgx.jpg

    I would like my XML shown in the Outlook mail body the same way as IE
    (or Firefox, or Google ...) does.
    The XML must not be sent as a mail attachment since I was requested
    not to attach any file to the mails.

    My first idea was to transform my plain XML to the Outlook HTML format
    but I did not find such a XSL to do this.
    I am working in C++ using Xerces/Xalan.

    * So, do you know a XSL which could convert XML to the Outlook HTML
    format ?

    * Any other idea is welcomed.

    Thx in advance.
    Castor Nageur, Oct 14, 2010
    #1
    1. Advertising

  2. Castor Nageur wrote:
    > Hi all,
    >
    > I have a Unix application which actually mails some plain UTF-8 XML
    > text messages.
    > Here is one of my XML:
    >
    > <?xml version="1.0" encoding="UTF-8" standalone="no" ?
    >> <xml><date>10-14-2010</date><someutf8data>々〆〇〈〉《》「ã€ã€Ž</someutf8data></

    > xml>
    >
    > If I open this XML with IE, I will get the following (indented &
    > colored) result:
    >
    > http://www.cijoint.fr/cj201010/cijJQyaKgx.jpg
    >
    > I would like my XML shown in the Outlook mail body the same way as IE
    > (or Firefox, or Google ...) does.
    > The XML must not be sent as a mail attachment since I was requested
    > not to attach any file to the mails.
    >
    > My first idea was to transform my plain XML to the Outlook HTML format
    > but I did not find such a XSL to do this.
    > I am working in C++ using Xerces/Xalan.
    >
    > * So, do you know a XSL which could convert XML to the Outlook HTML
    > format ?
    >
    > * Any other idea is welcomed.


    I don't know what Outlook HTML format is. If you want to transform XML
    to HTML the way some browsers do then google for "XSLT default
    stylesheet", it turns up stuff like
    http://www.stylusstudio.com/xsllist/200105/post31010.html

    Be aware that IE (at least IE 5 to 8) do not use the standardized XSLT
    language for the transformation but rather some proprietary predecessor.
    In IE's language I think stuff like the XML declaration or a document
    type declaration are represented in the data model and can that way be
    output. With the standardized XSLT language neither the XML declaration
    or the document type declaration are represented in the data model,
    therefore an XSLT stylesheet can't read such stuff and copy it to the
    output.



    --

    Martin Honnen
    http://msmvps.com/blogs/martin_honnen/
    Martin Honnen, Oct 14, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    21,431
    kalyan_iitd
    Jul 4, 2006
  2. Frank
    Replies:
    2
    Views:
    876
    Scott M.
    Apr 22, 2007
  3. Frank
    Replies:
    3
    Views:
    677
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Feb 28, 2007
  4. Marcel Kessler

    Convert HTML to plain text

    Marcel Kessler, Nov 13, 2006, in forum: Java
    Replies:
    3
    Views:
    1,671
    Karl Uppiano
    Nov 14, 2006
  5. mahesh
    Replies:
    2
    Views:
    1,184
    Real Gagnon
    Feb 17, 2007
Loading...

Share This Page