Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alex-Swann/ed0f164068b48d372223157faf16c6f5 to your computer and use it in GitHub Desktop.
Save Alex-Swann/ed0f164068b48d372223157faf16c6f5 to your computer and use it in GitHub Desktop.
Print a list of all attributes in the CCMS payload
module CCMS
class PayloadParser
def initialize
@doc = File.open(Rails.root.join('ccms_integration/example_payloads/PassportedSingleProceedingNonMolDelegated.xml')) { |f| Nokogiri::XML(f).remove_namespaces! }
end
def run
puts ">>>>>>>>> #{__FILE__}:#{__LINE__} <<<<<<<<<<\n"
x = @doc.xpath('//Attributes//Attribute//Attribute')
attrs = []
x.each { |z| attrs << z.text }
attrs.sort!
pp attrs
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment