Describe profile
[irspy-moved-to-github.git] / zebra / ezeerex2pqfproperties.pl
1 #! /usr/bin/perl -w
2
3 # $Id: ezeerex2pqfproperties.pl,v 1.1 2006-06-05 09:18:58 mike Exp $
4
5 use strict;
6 use warnings;
7 use XML::LibXML;
8
9 my $text = join("", <>);
10 my $parser = new XML::LibXML();
11 my $doc = $parser->parse_string($text);
12 my $root = $doc->getDocumentElement();
13 print "root=$root, ISA=(", join(", ", @XML::LibXML::Element::ISA), ")\n";
14 $root->registerDefaultNs("/.//")
15 my (@nodes) = $root->findnodes('serverInfo/host');
16 print "found ", scalar(@nodes), " values\n";
17
18 ## From http://plasmasturm.org/log/259/
19 #use XML::LibXML;
20 #use XML::LibXML::XPathContext;
21 #my $p = XML::LibXML->new();
22 #my $doc = $p->parse_file( $ARGV[ 0 ] );
23 #my $xc = XML::LibXML::XPathContext->new( $doc->documentElement() );
24 #$xc->registerNs( atom => 'http://purl.org/atom/ns#' );
25 #print $xc->findvalue( q{ /xsl:stylesheet/xsl:template[ @match = '/' ]/atom:feed/atom:link[ @rel = 'alternate' ]/@href } );