def legalEntityInfos(leI) #:nodoc:
      ret = {}
      ret[:legalStatus] = leI.xpath('frnic:legalStatus', EPPClient::SCHEMAS_URL).attr('s').value
      unless (r = leI.xpath('frnic:idStatus', EPPClient::SCHEMAS_URL)).empty?
        ret[:idStatus] = { :value => r.text }
        ret[:idStatus][:when] = r.attr('when').value if r.attr('when')
        ret[:idStatus][:source] = r.attr('source').value if r.attr('source')
      end
      %w(siren VAT trademark DUNS local).each do |val|
        unless (r = leI.xpath("frnic:#{val}", EPPClient::SCHEMAS_URL)).empty?
          ret[val.to_sym] = r.text
        end
      end
      unless (asso = leI.xpath('frnic:asso', EPPClient::SCHEMAS_URL)).empty?
        ret[:asso] = {}
        if !(r = asso.xpath('frnic:waldec', EPPClient::SCHEMAS_URL)).empty?
          ret[:asso][:waldec] = r.text
        else
          unless (decl = asso.xpath('frnic:decl', EPPClient::SCHEMAS_URL)).empty?
            ret[:asso][:decl] = Date.parse(decl.text)
          end
          publ = asso.xpath('frnic:publ', EPPClient::SCHEMAS_URL)
          ret[:asso][:publ] = {
            :date => Date.parse(publ.text),
            :page => publ.attr('page').value,
          }
          if (announce = publ.attr('announce')) && announce.value != '0'
            ret[:asso][:publ][:announce] = announce.value
          end
        end
      end
      ret
    end
def legalEntityInfos(leI) #:nodoc:
      ret = {}
      ret[:legalStatus] = leI.xpath('frnic:legalStatus', EPPClient::SCHEMAS_URL).attr('s').value
      unless (r = leI.xpath('frnic:idStatus', EPPClient::SCHEMAS_URL)).empty?
        ret[:idStatus] = { :value => r.text }
        ret[:idStatus][:when] = r.attr('when').value if r.attr('when')
        ret[:idStatus][:source] = r.attr('source').value if r.attr('source')
      end
      %w(siren VAT trademark DUNS local).each do |val|
        unless (r = leI.xpath("frnic:#{val}", EPPClient::SCHEMAS_URL)).empty?
          ret[val.to_sym] = r.text
        end
      end
      unless (asso = leI.xpath('frnic:asso', EPPClient::SCHEMAS_URL)).empty?
        ret[:asso] = {}
        if !(r = asso.xpath('frnic:waldec', EPPClient::SCHEMAS_URL)).empty?
          ret[:asso][:waldec] = r.text
        else
          unless (decl = asso.xpath('frnic:decl', EPPClient::SCHEMAS_URL)).empty?
            ret[:asso][:decl] = Date.parse(decl.text)
          end
          publ = asso.xpath('frnic:publ', EPPClient::SCHEMAS_URL)
          ret[:asso][:publ] = {
            :date => Date.parse(publ.text),
            :page => publ.attr('page').value,
          }
          if (announce = publ.attr('announce')) && announce.value != '0'
            ret[:asso][:publ][:announce] = announce.value
          end
        end
      end
      ret
    end
parse legalEntityInfos content.