Skip to content

Instantly share code, notes, and snippets.

@slima

slima/1_xml.rb Secret

Last active December 12, 2018 18:36
Show Gist options
  • Save slima/3828d66178c10be259b607648f64be89 to your computer and use it in GitHub Desktop.
Save slima/3828d66178c10be259b607648f64be89 to your computer and use it in GitHub Desktop.
doc = File.open(profile_file) { |f| Nokogiri::XML(f).remove_namespaces!}
ble = doc.xpath("//WANConnectionsConfigurations//DictionaryEntry//Value")[0]
puts ble
ble.each do |v|
puts v
end
<Value ClassID="2" IsNewClass="true" ClassName="Motive.Development.BaseData.H660.AdvacnedConfiguration.WANConnectionsConfigrations">
<ISP>3</ISP>
<VID>123</VID>
</Value>
ClassID
2
IsNewClass
true
ClassName
Motive.Development.BaseData.H660.AdvacnedConfiguration.WANConnectionsConfigrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment