From: Bob Aiello Date: 2011-09-06T08:42:09+09:00 Subject: Re: Ruby and XML --Boundary_(ID_aJ7cb6rmRUaTbcf7ftzTJQ) Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8BIT thanks for all of the excellent responses. I am going through them all. I have attached a copy of an XML (with some of the name/value pairs deleted for brevity. core.was.home /usr/IBM/WebSphere/AppServer1/profiles/AppSrvQA core.was.username admin core.was.password password core.application.name myapp core.application.context.root myroot Essentially, I have hundreds of XML files like this one that contain many many name value pairs. I am concerned that the value is defined differently (actually I have seen this) in one or more of the XML. I want to take an xml file and then parse the name/value pairs into a list. Then I want to check that list against all of the other XML in the system that have the same name/value pairs. So I might find that one XML defines core.application.context.root myroot and another XML defines this name/value pair as core.application.context.root bigroot Which would indicate a configuration management error that needs to be corrected. (Half the application is looking in the wrong place for the core.application.context.root) Ultimately, I want to implement this as part of an application deployment framework possibly using Puppet or Chef. Bob Aiello http://www.linkedin.com/in/BobAiello _______________________________________________________________ On 9/4/2011 3:12 PM, Bartosz Dziewo��ski wrote: > First of all, I'd recommend you a different library. Personalyl I > found REXML awkward to use, Nokogiri (`gem install nokogiri`) is much > better. (It also parses HTML.) > > We'll probably need the XML file to be able to help you. > > -- Matma Rex > > --Boundary_(ID_aJ7cb6rmRUaTbcf7ftzTJQ) Content-type: text/xml; name=test.xml Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=test.xml core.was.home /usr/IBM/WebSphere/AppServer1/profiles/AppSrvQA core.was.username admin core.was.password password core.application.name myapp core.application.context.root myroot --Boundary_(ID_aJ7cb6rmRUaTbcf7ftzTJQ)--