当我使用 Html Agility Pack 加载某些 html 文件时,我发现当 html 标签中的文本具有像这样的三角括号时,它不会关闭某些标签(查看 InnerHtml 和 OuterHtml 属性)
<span class='title'> Launching app results in an error "Activation of http://<server name="">/TemplateBuilder/?language=1033&locale=1033 resulted in exception"</span>
所以我得到输出
<span class='title'> Launching app results in an error "Activation of http://<server name="">/TemplateBuilder/?language=1033&locale=1033 resulted in exception"
有什么办法可以保护它吗?因为在输出中缺少,所以没有显示整个 html。
谢谢
最佳答案
发生这种情况是因为您的原始 html 太无效了。应该是:
<span class='title'> Launching app results in an error "Activation of http://<server name="">/TemplateBuilder/?language=1033&locale=1033 resulted in exception"</span>
Html Agility Pack 无法检测到这种格式错误的 html。
https://stackoverflow.com/questions/8231285/
相关文章:
Ruby Gem 安装失败 - 执行 gem 时出错 - 未初始化的常量 Syck::Syck
django - 如何更改方法 is_valid() 中的表单字段
ruby-on-rails - Rails - I18n - 如何本地化 f.collection_
drupal - 在 drupal 7 中将表单元素添加到节点以供用户输入
continuous-integration - 自动构建 Access 2007 数据库
sql-server - 'Insert into linked table failed, RAI