Tod Harter wrote:
This works fine for returning scalars, but if I return an XML::LibXML::NodeList object tragedy strikes!

Specifically the callback code is thus:

sub attributes : CallBack(attributes)
       {

       get_logger()->debug("ATTRIBUTES WAS CALLED");
       my $df = XML::LibXML::NodeList->new();
       for my $key (keys %{get_session_handler()->session()})
               {
               get_logger()->debug("key is $key");
               my $e = XML::LibXML::Element->new('key');
               $e->setAttribute('name',$key);
               $e->appendText(get_session_handler()->session()->{$key});
               $df->push($e);
               }
use Data::Dumper;
get_logger()->debug("NODE LIST IS : ".Dumper($df));
      return $df;
       }

There used to be known issues with this, and I don't know if they were fixed so your problem might require some backtracing and XS patching.

However I do note that the elements you return belong to no document, which shouldn't happen. Maybe if you passed your function a node from the document it's processing and used that document to create the elements it would work better?

--
Robin Berjon
  Senior Research Scientist
  Expway, http://expway.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to