Created
April 13, 2021 15:44
-
-
Save miyo/67796961700d7e1ed46d286a496326f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
xml = Nokogiri::XML($stdin) | |
texts = xml.xpath('//xmlns:text') | |
texts.each{|text| | |
str = "" | |
text.xpath('xmlns:tspan').each{|n| | |
str += n.text | |
} | |
puts str | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment