这就是我想要的
*[local-name() = 'foo' and namespace-uri() = 'http://example.com/']
这是我尝试过的
import csv
s = ['hello, my name is \"Joe\"']
filename = "C:/Users/myself/Documents/out.csv"
with open(filename, 'w', newline='', encoding='utf-8') as f_out:
writer = csv.writer(f_out)
writer.writerow(s)
但这表示以下内容。
<messages>
<message from="aaa" date="2019-07-09T13:41:12Z">sampletext1</message>
<message from="bbb" date="2019-07-09T14:26:36Z">sampletext2</message>
</messages>
如何使用openapi 3.0.2在“ message”标签中获取属性“ from”和“ date”,并将消息标签之间的示例文本表示为没有“ value”标签的值? >