Applying the xpath second time?

已查看 6 次
跳至第一个未读帖子

Jari Lammi

未读,
2016年11月9日 09:12:162016/11/9
收件人 nokogi...@googlegroups.com
Hi!

Am I thinking this wrong and if yes, how?

Trying to parse camt.053.001.02.xml from https://www.iso20022.org/documents/messages/camt/instances/camt.053.001.02.zip where I’m able to select Ntry:

require ’nokogiri’
camt = Nokogiri::XML(File.read("camt.053.001.02.xml"), "rb”)
a=camt.xpath('//xmlns:Ntry’)
a.count

which gives 3. But shouldn’t it be possible to search things further from a?

2.1.8 :042 > a.xpath('//BookgDt//DtTm')
 => []

Which means I’m unable to follow the basic searching example on the tutorial. How do you do it?

Thanks in advance!

Jari
回复全部
回复作者
转发
0 个新帖子