What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! Help » Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs

Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs
Author: Message:
XP1
Junior Member
**

Avatar

Posts: 28
Joined: Nov 2004
O.P. Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs
Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs

Is there any way to convert XML chat logs to HTML chat logs just like Messenger Plus! Live?

I searched the threads on this forums but all led to dead links and posts from 2004 - 2006.

It's 2008 and there should be at least an XML to HTML converter out now.

--

Windows Live Messenger 9.0.1407.1107
Messenger Plus Live 4.60.0.324

This post was edited on 06-01-2008 at 02:27 PM by XP1.
06-01-2008 02:24 PM
Profile E-Mail PM Web Find Quote Report
XP1
Junior Member
**

Avatar

Posts: 28
Joined: Nov 2004
O.P. RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs
I copied and pasted sections of the HTML logs generated by Messenger Plus! Live into the XSL file generated by Windows Live Messenger. I was able to come up with a somewhat successful conversion, but there is a problem I don't understand yet.

Under the xml:for-each, I have to generate separate <table cellspacing="0"> and <tbody> tags. This causes the chat log text to be misaligned differently among each chat line.

This is my first time dealing with XSL / XML code. Can someone look into this issue to get it solved? Thanks.

I've attached the ZIP file containing the XSL file and a PNG screenshot.

If you cannot open ZIP files, copy and paste the following code below into an empty TXT file and rename it to MessageLog.xsl.



MessageLog.xsl:
code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="Log">
    <html>
    <head>
    <title>Messenger Plus! Chat Log</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-16"/>
    <style type="text/css">
body {
    background-color: white;
    padding:0;
    margin:10px 10px 20px 10px;
    color:black;
    font-size: 0.8em;
    font-family: "MS Shell Dlg", sans-serif;
}
img {
    vertical-align: text-bottom;
}
h1, h2 {
    font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
    margin:0;
    padding:0;
}
h1 {
    color:#3aba07;
    letter-spacing:-1px;
    font-weight:normal;
    font-size: 1.8em;
    margin:0;
    padding:0;
}
h2 {
    color:#1987cc;
    font-size: 1.2em;
    margin:10px 0 2px 0;
    padding:3px 0;
    border-top:1px solid #dcf7fd;
}
.mplsession {
    padding: 0 0 20px 0;
}
.mplsession img {
    vertical-align:top;
}
.mplsession img.bigimg {
    vertical-align:text-bottom;
}
.mplsession ul {
    list-style-type:none;
    margin:0;
    padding:0;
    border-top: 1px solid #6ed6f3;
    border-bottom:4px solid #f7feef;
    font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
    font-size:0.95em;
    color:#333333;
}
.mplsession ul li {
    padding:0 7px 2px 7px;
    background:#dcf7fd;
    border-top:2px solid #edfbfe;
    border-bottom:1px solid #6ed6f3;
}
.mplsession ul li.in {
    background:#edfbfe;
    border-top:2px solid #fff;
}
.mplsession table {
    font-size: 1em;
    margin:5px 0 10px 0;
    padding:0;
    width:100%;
}
.mplsession table th {
    text-align:left;
    font-weight:bold;
    padding:1px 2px 3px 6px;
    padding-right:1em;
    vertical-align:top;
    white-space:nowrap;
}
.mplsession table th span.time {
    color:#949494;
    font-weight:normal;
}
.mplsession table td {
    padding:1px 2px;
    width:100%;
    vertical-align:top;
}
.mplsession table tr {
    color:black;
}
.mplsession table tr.messenger td, .mplsession table tr.messenger th {
    background:#ffffe6;
    padding-top:2px;
    padding-bottom:2px;
    border:1px solid #e9e9e9;
}
.mplsession table tr.messenger td {
    border-left:0;
}
.mplsession table tr.messenger th {
    border-right:0;
    padding-left:5px;
}
.mplsession table tr.msgplus td, .mplsession table tr.msgplus th {
    background:#ffffe6;
    padding-top:2px;
    padding-bottom:2px;
    border:1px dashed #e9e9e9;
}
.mplsession table tr.msgplus td {
    border-left:0;
}
.mplsession table tr.msgplus th {
    border-right:0;
    padding-left:5px;
}
@media print {
.mplsession table {
    width:97%;
}
}
</style>
    <!-- If you want to customize the style used in this file, create a "custom.css" file -->
    </head>
    <body>
    <h1>Messenger Plus! Chat Log</h1>
    <div class="mplsession">
      <!--This for-each creates the lines needed for clickable links to Session logs-->
      <xsl:for-each select="Message">
        <!--This if checks the first Message of each SessionID-->
        <xsl:if test="not(preceding-sibling::Message[1]/@SessionID = @SessionID)">
          <xsl:choose>
            <xsl:when test="not(preceding-sibling::Message[1]/@SessionID = @SessionID)">
              <a href="#{@DateTime}"> <xsl:value-of select="@Date" /><xsl:text> </xsl:text><xsl:value-of select="@Time" /> </a> <xsl:text> </xsl:text>(<xsl:value-of select="Text" />)<br/>
            </xsl:when>
          </xsl:choose>
        </xsl:if>
      </xsl:for-each>
      <xsl:for-each select="Message">
        <xsl:choose>
          <xsl:when test="not(preceding-sibling::Message[1]/@SessionID = @SessionID)">
            <h2><a name="{@DateTime}"> </a> Session Start: <xsl:value-of select="@Date" /></h2>
            <ul>
              <xsl:for-each select="From/User">
                <li class="in"> <xsl:value-of select="@FriendlyName" /></li>
              </xsl:for-each>
              <xsl:for-each select="To/User">
                <li> <xsl:value-of select="@FriendlyName" /></li>
              </xsl:for-each>
            </ul>
          </xsl:when>
        </xsl:choose>
        <table cellspacing="0">
          <tbody>
          <xsl:comment>
            (<xsl:value-of select="@Time" />)
          </xsl:comment>
          <tr>
            <th><span class="time">(<xsl:value-of select="substring(@Time, 1, 4)" /> <xsl:text> </xsl:text> <xsl:value-of select="substring(@Time, 9, 10)" />)</span> <xsl:text> </xsl:text> <xsl:value-of select="substring(From/User/@FriendlyName, 1, 17)" />:</th>
            <td style="{Text/@Style}"><xsl:value-of select="Text" /></td>
          </tr>
          </tbody>
         
        </table>
      </xsl:for-each>
    </div>
    </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

.zip File Attachment: XML to HTML MessageLog.zip (64.53 KB)
This file has been downloaded 1264 time(s).

This post was edited on 06-02-2008 at 04:36 AM by XP1.
06-02-2008 04:34 AM
Profile E-Mail PM Web Find Quote Report
Ruki
New Member
*


Posts: 1
Joined: Sep 2009
RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs
I know this was in 2008 but seeing as how it's been a year since then, and I am interested in the same thing this poster is, converting XML chat logs into HTML, I figure I would post here.  Does anyone know anything about this?
09-07-2009 05:49 PM
Profile E-Mail PM Find Quote Report
XP1
Junior Member
**

Avatar

Posts: 28
Joined: Nov 2004
O.P. RE: RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs
quote:
Originally posted by Ruki
I know this was in 2008 but seeing as how it's been a year since then, and I am interested in the same thing this poster is, converting XML chat logs into HTML, I figure I would post here.  Does anyone know anything about this?
Did you see my post above? Just drop in the new XSL file in the same directory.
09-07-2009 06:09 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On