Applying the xpath second time?

6 views
Skip to first unread message

Jari Lammi

unread,
Nov 9, 2016, 9:12:16 AM11/9/16
to 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
Reply all
Reply to author
Forward
0 new messages