[MOBY-l] parameter handling problems

Dirk Haase d.haase at gsf.de
Wed Aug 3 06:25:20 UTC 2005


On Tuesday 02 August 2005 17:42, Ulrich Harttig wrote:

> ($secondary) = getNodeContentWithArticle($input, "Parameter", "VarType");
>
> does not find any content although the $input node contains
>
> <moby:Parameter moby:articleName="VarType">
>      <moby:Value>xml</moby:Value>
> </moby:Parameter>
>
> Is there any reason why this shouldn't work ?

If I remember correctly, I tried the same and didn't work for me neither...

> Could someone point me to examples where accessing parameters works ?

Here is what works for me: the service takes several secondaries, so it puts 
all parameter values into a %paramHash:

if ( $articleType == SECONDARY ) {
  my $param = $input->getAttribute('articleName');
  my @valueNodes = $input->getChildrenByTagName('moby:Value');
  my $value = $valueNodes[0]->textContent(); # there should be only one value
  $paramHash{$param} = $value;
}

Hope this helps. 

Regards,
dirk



More information about the moby-l mailing list