xpath 句号转义
时间: 2023-10-23 18:30:13 浏览: 117
xpath 的语法
在XPath中,如果你要查找包含句号的文本,你需要使用转义字符“\”来转义句号。这样XPath才能正确地解析句号。例如,如果你要查找所有包含句号的元素,可以使用以下XPath表达式://*[contains(text(), '.')]。注意,在双引号中嵌套使用单引号,或者在单引号中嵌套使用双引号,以便正确地构造XPath表达式。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [怎样编写一个Android项目中的.xml文件](https://blog.csdn.net/youbestcando/article/details/131836234)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [python爬虫的页面数据解析和提取/xpath/bs4/jsonpath/正则(1)](https://blog.csdn.net/weixin_30895603/article/details/99478650)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文