From 8f1665e0e18a19bcd3dc1abc26b7c8609fe0e606 Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sun, 31 Mar 2013 17:02:46 +0200 Subject: [PATCH] find text --- extract_amendments.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extract_amendments.rb b/extract_amendments.rb index a565c3b..c1cfe2f 100755 --- a/extract_amendments.rb +++ b/extract_amendments.rb @@ -23,3 +23,9 @@ doc = Nokogiri::XML::Document.parse(xml) if xml_dump_path File.open(xml_dump_path, "w") { |f| f.write doc.to_xml(indent: 2) } end + + +text = doc.xpath('//office:text').first +raise "no office:text found" unless text + + -- GitLab