中国开发网: 论坛: 程序员情感CBD: 贴子 561754
freegink: 一个模板
<?xml version="1.0" encoding="UTF-8"?>
<HtmlTemplate CreateDate="2007-6-12 16:22:50" ModifyDate="2007-8-6 15:16:59" Title="" Author="" Homepage="" Encoding="gb2312" Memo="">
<UrlRule>
<Urls>
<UrlFetcher Pattern="/zh_cn/netschool/programme/delphi/3916/.+\.htm" GroupIndex="0" UrlFormat="http://tech.china.com{0}" />
<Url>http://tech.china.com/zh_cn/netschool/programme/delphi/</Url>
</Urls>
</UrlRule>
<Variables>
<Variable Name="Title" VarType="Text" DefaultValue="">
</Variable>
<Variable Name="Keywords" VarType="Text" DefaultValue="Delphi">
</Variable>
<Variable Name="ComeFrom" VarType="Text" DefaultValue="">
</Variable>
<Variable Name="Author" VarType="Text" DefaultValue="">
</Variable>
<Variable Name="CategoryID" VarType="Text" DefaultValue="632706066952996684">
</Variable>
<Variable Name="Content" VarType="Text" DefaultValue="">
</Variable>
</Variables>
<Templates>
<Template Pattern="&lt;td width=&quot;600&quot;&gt;((?:.|\n)*?)&lt;/td&gt;&lt;/tr&gt;" StartMatch="0" EndMatch="0" Commit="False" Clear="False" ParentMatchIndex="0" ParentGroupIndex="1">
<Template Pattern="&lt;font size=4&gt;&lt;b&gt;&lt;br&gt;((?:.|\n)*?)&lt;/b&gt;&lt;/span&gt;&lt;/font&gt;" StartMatch="0" EndMatch="0" Commit="False" Clear="False" ParentMatchIndex="0" ParentGroupIndex="1">
<Assignment Variable="Title" MatchIndex="0" GroupIndex="1" />
</Template>
<Template Pattern="&lt;table border=0 width=100%&gt;&lt;tr&gt;&lt;td&gt;((?:.|\n)*)&lt;/td&gt;&lt;/tr&gt;" StartMatch="0" EndMatch="0" Commit="False" Clear="False" ParentMatchIndex="0" ParentGroupIndex="0">
<Template Pattern="&lt;span class=large&gt; &lt;font color=&quot;#000000&quot;&gt;((?:.|\n)*)&lt;br&gt;&lt;br&gt;" StartMatch="0" EndMatch="0" Commit="False" Clear="False" ParentMatchIndex="0" ParentGroupIndex="1">
<Assignment Variable="Content" MatchIndex="0" GroupIndex="1" />
</Template>
<Template Pattern="(?:.*)&lt;br&gt; (.*)$" StartMatch="0" EndMatch="0" Commit="False" Clear="False" ParentMatchIndex="0" ParentGroupIndex="1">
<Template Pattern="([^ ]+)" StartMatch="0" EndMatch="0" Commit="True" Clear="True" ParentMatchIndex="0" ParentGroupIndex="1">
<Assignment Variable="ComeFrom" MatchIndex="0" GroupIndex="1" />
<Assignment Variable="Author" MatchIndex="1" GroupIndex="1" />
</Template>
</Template>
</Template>
</Template>
<Repeat UrlPattern="&lt;a.+href=&quot;(.*)&quot;.*TITLE=&quot;到后一页&quot;" GroupIndex="1" />
<Nested UrlPattern="&lt;a style=&quot;text-decoration: none;&quot; href=&quot;([^&quot;]*?)&quot; TITLE=&quot;到后一页&quot;&gt;" GroupIndex="1" />
<Template Pattern="&lt;td colspan=&quot;2&quot; width=&quot;600&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;((?:.|\n)*?)&lt;/td&gt;&lt;/tr&gt; " ParentMatchIndex="0" ParentGroupIndex="0" StartMatch="0" EndMatch="0">
<Template Pattern="&lt;font size=4&gt;&lt;B&gt;((?:.|\n)*?)&lt;/B&gt;&lt;/font&gt;" ParentMatchIndex="0" ParentGroupIndex="0" StartMatch="0" EndMatch="0">
<Assignment Variable="Title" MatchIndex="0" GroupIndex="1" />
</Template>
<Template Pattern="&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;((?:.|\n)*?)&lt;/span&gt;&lt;/p&gt;" ParentMatchIndex="0" ParentGroupIndex="0" StartMatch="0" EndMatch="0">
<Template Pattern="&lt;p align=&quot;left&quot;&gt;&lt;span class=large&gt;&lt;font color=black id=&quot;zoom&quot;&gt;((?:.|\n)*?)$" ParentMatchIndex="0" ParentGroupIndex="1" StartMatch="0" EndMatch="0">
<Assignment Variable="Content" MatchIndex="0" GroupIndex="1" />
</Template>
</Template>
</Template>
</Templates>
</HtmlTemplate>

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录