S
smiledragon
Hi, I am newbie to XSLT, can you help me to write a XSLT to extract
article data from below web page? Thanks a lot
HTML page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>... Page Header ...</p>
<p class=PageTitle>Page Title</p>
<p class=ArticleTitle>Article Title</p>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
<td>Article Date </td>
<td>25/8/2007</td>
</tr>
<tr>
<td colspan="2"><p>Hey, I want to extract Page Title, Article
Title, Article Date and Article Content, Request By.</p>
<p>Please help me to write XSLT code to extract article data?
<br/>
<br/>
Thanks.</p></td>
</tr>
<tr align="right">
<td colspan="2">Author David </td>
</tr>
</table>
<p>... Page Footer ...</p>
</body>
</html>
XML Result Page
<?xml version="1.0" encoding="UTF-8"?>
<HTMLPage>
<PageTitle>Page Title</PageTitle>
<ArticleTitle>Article Title</ArticleTitle>
<ArticleDate>25/8/2007</ArticleDate>
<ArticleBody>
<p>Hey, I want to extract Page Title, Article Title, Article Date
<br/>
Thanks.</p>
</ArticleBody>
<Author>David</Author>
</HTMLPage>
article data from below web page? Thanks a lot
HTML page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>... Page Header ...</p>
<p class=PageTitle>Page Title</p>
<p class=ArticleTitle>Article Title</p>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
<td>Article Date </td>
<td>25/8/2007</td>
</tr>
<tr>
<td colspan="2"><p>Hey, I want to extract Page Title, Article
Title, Article Date and Article Content, Request By.</p>
<p>Please help me to write XSLT code to extract article data?
<br/>
<br/>
Thanks.</p></td>
</tr>
<tr align="right">
<td colspan="2">Author David </td>
</tr>
</table>
<p>... Page Footer ...</p>
</body>
</html>
XML Result Page
<?xml version="1.0" encoding="UTF-8"?>
<HTMLPage>
<PageTitle>Page Title</PageTitle>
<ArticleTitle>Article Title</ArticleTitle>
<ArticleDate>25/8/2007</ArticleDate>
<ArticleBody>
<p>Hey, I want to extract Page Title, Article Title, Article Date
<br/>
Thanks.</p>
</ArticleBody>
<Author>David</Author>
</HTMLPage>