我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

从net / html获取完整的标签/行号

After parsing a document using html.Parse(r io.Reader) we get a node tree. Each DOM node provides it's surroundings, the name of the tag and that tag's attributes. See here.

What's the best way to go from a node object to the string text of that node in the file r, as well as the line number of that tag within that file?

The html package does not record that information, so it is not available.

近期文章

  • Beego不接受Ajax参数
  • 在IBAction中如何读取UITextField的值?
  • 如何从主activity打开我自定义的类
  • java webservice 报错
  • 带有缓冲通道的死锁
  • golang exec错误行为
  • golang —初始化项目变量
  • Golang模板无法呈现html
  • 在Mac上构建google / gxui示例错误
  • 将HTTP请求发送到API时如何模拟
  • 服务升级进程已退出,并显示错误代码
  • 如何使用firego从firebase获取值?
  • 将* bytes.Buffer转换为json并在应用程序引擎中解组
  • 将uint32数组写入字节片中并获取回来
  • 转到PayPal REST API格式错误的请求
  • Javascript开发人员在A *实现中为指针而苦苦挣扎
  • AES-CFB从Go到JS forge
  • 使用http.Redirect和多部分请求获取连接重置错误
  • 在C导入后Go中的main()无法运行
  • 如何在Go中将bson.Binary转换为[] byte

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华