- my $node = $nodes[0];
- # $node ISA XML::LibXML::ElementXML::LibXML::Element
- $this->_half_decent_appendWellBalancedChunk($node, $frag);
- #print STDERR "POST: zeerex='$root' = \n", $root->toString(), "\n";
+ $this->{irspy}->log("warn",
+ scalar(@nodes), " matches for '$xpath': using first")
+ if @nodes > 1;
+
+ $this->_half_decent_appendWellBalancedChunk($nodes[0], $frag);
+}
+
+sub xpath_context {
+ my $this = shift();
+
+ return irspy_xpath_context($this->{zeerex});
+}
+
+sub store_result {
+ my ($this, $type, %info) = @_;
+ my $xml = "<irspy:$type";
+
+ foreach my $key (keys %info) {
+ $xml .= " $key=\"" . xml_encode($info{$key}) . "\"";
+ }
+
+ $xml .= ">" . isodate(time()) . "</irspy:$type>";
+
+ $this->{irspy}->log("irspy_data", $xml);
+ $this->append_entry('irspy:status', $xml . "\n");