编程语言
首页 > 编程语言> > python xpath xml namespaces|How does XPath deal with XML namespaces?

python xpath xml namespaces|How does XPath deal with XML namespaces?

作者:互联网



 

 

<?xml version="1.0" encoding="UTF-8"?><Root xmlns="http://www.nexacro.com/platform/dataset" ver="5000"><Parameter id="HEDPAG" type="string"><Parameter id="HEDNEX" type="string"><Parameter id="HEDRTN" type="string"><Parameter id="HEDMSG" type="string"><Parameter id="UPDATE_CNT" type="string"><Dataset id="OUT1">

 

 

 

Python (Scrapy):

response.selector.register_namespace('i', 'http://schema.intuit.com/finance/v3')
response.xpath('/i:IntuitResponse/i:QueryResponse').getall()

 

标签:xpath,xml,deal,XPath,XML,namespaces,response
来源: https://blog.51cto.com/u_13888585/2810975