我有一个来自 URL 的 XML 响应,该响应被转换为一个哈希数组,如下所示:
{ “员工名单”=>{ “员工档案”=>{ "BuildLoc"=>{"$"=>"1 个快乐的地方"}, "状态"=>{"$"=>"A"}, "SecrTitle"=>[{}, {}], “ID”=>{}, “bct”=>{}, "NUM"=>{"$"=>"1234567"}, "BuildCity"=>{"$"=>"代顿"}, "BuildFloor"=>{"$"=>"6"}, "费用"=>{"$"=>"1345"}, "姓氏"=>{"$"=>"史密斯"}, “中”=>{}, "SecrName"=>[{}, {}], "内部SMTP地址"=>{"$"=>"Joe.Smith@happy.com"}, "IAddress"=>{"$"=>"Joe.Smith@happy.com"}, "PreferredLastName"=>{}, "DisplayName"=>{"$"=>"Joe Smith"}, "CellPhoneNo"=>{}, "职称"=>{"$"=>"博士"}, "BuildStreetAddress"=>{"$"=>"123 欢乐小镇"}, "BuildState"=>{"$"=>"IL"}, "名字"=>{"$"=>"乔"}, "AltContactTitle1"=>{}, "部门成本CtrNo"=>{"$"=>"129923"}, "PreferredFirstName"=>{"$"=>"乔"}, "AltContactName2"=>{}, "AltContactPhone2"=>{}, "GDP"=>{}, "BuildZip"=>{"$"=>"112345"}, "RegionID"=>{"$"=>"NAMR"}, "就业类型"=>{"$"=>"E"}, "临时电话"=>{}, "BuildID"=>{"$"=>"01114"}, "CountryAbbr"=>{"$"=>"USA"}, "FaxDisp1"=>{}, "BuildCountry"=>{"$"=>"United States"} } }, 无=>无 }
提取“ DisplayName
”和“ InternalSMTPAddress
”值的最简单方法是什么?