根据div 标签 查看数组@class=modulwrap 下面的/table/tbody/tr/td
2016-10-21 15:51
351 查看
<div class="modulwrap"> <div class="request_title"> <span class="request_sub_title">接口</span> <div class="hrdiv"> <hr class="hr_line"> </div> </div> <table> <tbody> <tr> <th width="25%" colspan="1"> 请求方法 </th> <th width="40%"> 请求地址</th> <th width="10%"> 版本号(apiver)</th> <th width="25%"> 支持设备(platform)</th> </tr> <tr> <td colspan="1"><strong>Get</strong> </td> <td>/product/forcast/detail</td> <td>1</td> <td>支持所有设备</td> </tr> </tbody> </table> jrhmpt01:/root# cat yy1.pl use LWP::UserAgent; use DBI; use POSIX; use Data::Dumper; use HTML::TreeBuilder; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; $ua->agent("Mozilla/8.0"); use HTML::TreeBuilder::XPath; my $tree= HTML::TreeBuilder::XPath->new; $tree->parse_file( "ProductForcastController.html"); my @type=$tree->findvalues( '/html/body//div[@class="modulwrap"]/table/tbody/tr/td'); print "\@type is @type\n"; 根据div 标签 查看数组@class=modulwrap 下面的/table/tbody/tr/td jrhmpt01:/root# perl yy1.pl @type is Level_3 Get /product/forcast/detail 1 支持所有设备 ProductForcastController getInfo 1 sn 否 公告编号 NOSET Integer 1 contractSymbol 否 产品标记 NOSET String 1 contractName 是 合约 名称 NOSET String 合约名称 1 contractSymbol 是 合约编号 NOSET String 合约编号 1 createTime 是 创建时间 NOSET Date 创建时间 1 fileName 是 文件名称 NOSET String 文件名称 1 fileNameList 是 上 传文件名列表 NOSET String 上传文件名列表 1 filePath 是 文件路径 NOSET String 文件路径 1 name 是 公告名称 NOSET String 公告名称 1 productName 是 产品名称 NOSET String 产品名称 1 productSymbol 是 交易代码 NOSET String 交易代码 1 sn 是 SN NOSET Integer SN 1 updateTime 是 最近修改时间 NOSET Date 最近修改时间 1 xh 是 序号 NOSET Integer 序号 Success {"data": {"contractName":"testString","contractSymbol":"testString","createTime":"2000-01-01 01:01:01","fileName":"testString","fileNameList":"testString","filePath":"testString","name":"testString","productName":"testString","productSymbol":"testString","sn":1,"updateTime":"2000-01-01 01:01:01","xh":1},"retCode":"0000","retMsg":"调用结果说明"} Level_3 Get /product/forcast/list 1 支持所有设备 ProductForcastController list 1 search 否 查询字段 NOSET String 查询字段 1 orderField 否 排序字段 NOSET String 排序字段 1 orderWay 否 排序方式 NOSET String 排序方式 1 pageNum 否 页码 NOSET Integer 页码 1 pageSize 否 每页显条数 NOSET Integer 每页显示条数 1 contractName 是 合 约名称 NOSET String 合约名称 1 contractSymbol 是 合约编号 NOSET String 合约编号 1 createTime 是 创建时间 NOSET Date 创建时间 1 fileName 是 文件名称 NOSET String 文件名称 1 fileNameList 是 上传文件名列表 NOSET String 上传文件名列表 1 filePath 是 文件路径 NOSET String 文件路径 1 name 是 公告名称 NOSET String 公告名称 1 productName 是 产品名称 NOSET String 产品名称 1 productSymbol 是 交易代码 NOSET String 交易代码 1 sn 是 SN NOSET Integer SN 1 updateTime 是 最近修改时间 NOSET Date 最近修改时间 1 xh 是 序号 NOSET Integer 序号 Success {"data": {"dataList":[{"contractName":"testString","contractSymbol":"testString","createTime":"2000-01-01 01:01:01","fileName":"testString","fileNameList":"testString","filePath":"testString","name":"testString","productName":"testString","productSymbol":"testString","sn":1,"updateTime":"2000-01-01 01:01:01","xh":1}],"pageNum":1,"pageSize":5,"realLine":1,"totalLine":2,"totalPage":2},"retCode":"0000","retMsg":"调用结果说明"}
相关文章推荐
- 根据div 标签 查看数组@class=modulwrap 下面的/table/tbody/tr/td
- html标签的表格的tbody、tfoot、thead、colgroup、th、tr、td、table
- Jquery基础_点击按钮使div背景变色_根据class_根据标签_所有都变色_一直动画_实例(二)
- js动态增加,删除td,tr,table,div
- html5 表格标签 table tr td
- 关于td中嵌套table,table中有tbody tr td,在ie8上怎么完全填充table
- vb.net 使用 Regex Replace 正则 替换 Html字串的table中tbody第一个tr下的td为th
- html<table><th><tr><td><caption><thead><tbody><tfoot>属性总结
- table标签中tr和td的英文单词
- struts2的form等表单布局问题,去掉其自动生成的<table><tr><td>标签
- div 与 tr td table 嵌套关系
- 开发日志:struts标签[<s:selec>/<s:submit>/<s:form>......] 在table的时候位置错误 [会自动换行/自动生成tr、td的问题]
- HTML——表格table标签,tr或者td
- jQuery遍历Table tr td td中包含标签
- html5 表格标签 table tr td
- table的thead/tbody/tfoot/tr/th/td (转)
- jQuery语法中,table、tr、td标签并不是父子关系的特殊情况
- jQuery遍历Table tr td td中包含标签
- 返回结果自动在标签外添加<tr><td class="tdlabel">........</td></tr>
- 用jquery获取tbody下的第一个tr的最后一个td里面的第一个a标签