Getting the siblings of a node with Nokogiri
问题 Is there a way to find a specific value in a node and then return all its sibling values? For example, I would like to find find the id node that contains ID 5678 and then get the email address and all images associated with ID 5678. Nokogiri::XML.parse(File.open('info.xml')) Here's a sample XML file. <xmlcontainer> <details> <id>1234</id> <email>sdfsdf@sdasd.com</email> <image>images/1.jpg</image> <image>images/2.jpg</image> <image>images/3.jpg</image> </details> <details> <id>5678</id>