有没有一个小的 Perl XML 解析器可以替代 CGI.pm 的 HTML 生成功能? [英] Is there a small Perl XML parser that can replace CGI.pm's HTML generation functions?

查看:21
本文介绍了有没有一个小的 Perl XML 解析器可以替代 CGI.pm 的 HTML 生成功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有基于 XML::* 的小型(1-2 .pm)解析器,适合替换 CGI.pm 的结构,例如:

Is there any little (1-2 .pm's) parser based around XML::* and suitable for replacing CGI.pm's constructions like:

foreach($xmlnodes) {
    print table( TR( td( $_) ) ); }

使用 node2html($node,$rules)?

with node2html($node,$rules)?

我不会启动 XSLT.

I ain't going to fire up XSLT.

推荐答案

您正在考虑使用 push style 模板吗?IE.将纯 HTML 文件作为模板并使用 CSS 或 XSLT 选择器将内容推送到其中?

Is it push style templating you're thinking of? ie. take a plain HTML file as the template and using CSS or XSLT selectors to push content into it?

如果是这样,那么我用来执行此操作的两个 CPAN 模块是:

If so then two CPAN modules I've used to do this are:

另请参阅 Perlmonks 帖子,名为 推送样式模板系统,它提供了更多信息,包括可用的推送样式模板列表.

Also see the Perlmonks post called Push style templating systems which provides more information including a list of push style templates available.

如果不是推送样式,那么您是否正在寻找 HTML 构建器?如果是这样,请参阅此 Stackoverflow 问题:CL-WHO-like HTML 模板用于其他语言?

If not push style then are you looking for HTML builders? If so see this Stackoverflow question: CL-WHO-like HTML templating for other languages?

/I3az/

这篇关于有没有一个小的 Perl XML 解析器可以替代 CGI.pm 的 HTML 生成功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆