Skip to content
Snippets Groups Projects
Commit 455335e9 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

limit search for description to immediate child nodes

parent cdffeeac
Branches
Tags
No related merge requests found
......@@ -148,52 +148,13 @@ sub parse {
}
push @{ $data->{contacts} }, \%contact_details;
}
}
foreach my $displayname (
$child->getElementsByLocalName('DisplayName')
) {
$data->{display_name}->{ $displayname->getAttribute('xml:lang') } =
$displayname->textContent();
## Set a default displayName in case no English version is provided
## However there is no way to determine the native displayName
## We take the first one as default
if ( !$data->{default_display_name}
|| $displayname->getAttribute('xml:lang'))
{
$data->{default_display_name} = $displayname->textContent();
} elsif ($child->localname() eq 'Organization') {
foreach my $name ($child->getChildrenByLocalName('OrganizationName')) {
$data->{name}->{ $name->getAttribute('xml:lang') } = $name->textContent();
}
}
foreach my $description (
$child->getElementsByLocalName('Description')
) {
$data->{description}->{ $description->getAttribute('xml:lang') } =
$description->textContent();
}
foreach my $contact (
$child->getElementsByLocalName('ContactPerson')
) {
my %contact_details;
$contact_details{type} =
$contact->getAttribute('contactType');
foreach my $contact_child ($EntityDescriptor->childNodes()) {
$contact_details{ $contact_child->localName } =
$contact_child->textContent();
foreach my $name ($child->getChildrenByLocalName('OrganizationDisplayName')) {
$data->{display_name}->{ $name->getAttribute('xml:lang') } = $name->textContent();
}
push @{ $data->{contacts} }, \%contact_details;
}
foreach my $sso (
$child->getElementsByLocalName('OrganizationDisplayName')
) {
$data->{organization} = $sso->textContent();
}
## Getting X.509 certificates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment