Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Perfsonar lookup service question

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Perfsonar lookup service question


Chronological Thread 
  • From: Andrew Lake <>
  • To:
  • Cc: ,
  • Subject: Re: [perfsonar-user] Perfsonar lookup service question
  • Date: Fri, 30 Apr 2010 13:27:25 -0400

Hi Weiping,

The html on the page was causing those lines to be displayed incorrectly. The
</ in the regular expression was the source of the problem. I have now
corrected the page. The correct code block looks like the following:

if( $hLSResult->{response} && $hLSResult->{response} =~ /^<./ ){
# Print list of matching bwctl server addresses
my $resParser = XML::LibXML->new();
my $hLSDoc = $resParser->parse_string($hLSResult->{response});

Also, if it helps you may download the code examples on this page here:
http://psps.perfsonar.net/ps-client-examples-v1.1.tar.gz. There is also a
link to this file on the bottom of the page.

Thanks!
Andy


On Apr 30, 2010, at 1:09 PM, Jason Zurawski wrote:

> Hello, I am trying to understand lookup service based on the address
>
> http://psps.perfsonar.net/client-doc.html
>
> In the paragraph
>
> The instance in the above example is the URL of an LS service to contact.
> Examples
> 1. Find all SNMP Measurement Archives
>
>
> There are examples how to crate XQuery to be sent to home lookup services
>
> In the example code (XQuery to be sent up to home lookup based on Find all
> SNMP Measurement Archieves)
>
>
> (Line1) if($hLSResult->{response} && $hLSResult->{response} =~ /^new();
> (Line2) my $hLSDoc =
> $resParser->parse_string($hLSResult->{response});
>
>
>
> For some reason, perl can't understand (Line1) to (Line2)
>
> for example
>
> in Line2 , it is using $resParser but $resParser is not declared anywhere
> in the code
> and when I run the code, it complains about it
>
>
>
> if I change $resParser to $parser, it complains that
>
> Thread 65 terminated abnormally: Can't call method "parse_string" on
> unblessed reference
>
>
> Thank you
>




Archive powered by MHonArc 2.6.16.

Top of Page