Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Help (/forumdisplay.php?fid=12)
+----- Thread: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs (/showthread.php?tid=84081)
Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs by XP1 on 06-01-2008 at 02:24 PM
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
RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs by XP1 on 06-02-2008 at 04:34 AM
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"?>
<xsltylesheet 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>
</xsltylesheet>
RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs by Ruki on 09-07-2009 at 05:49 PM
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?
RE: RE: Convert Windows Live Messenger XML ChatLogs to Messenger Plus! Live HTML ChatLogs by XP1 on 09-07-2009 at 06:09 PM
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.
|