GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XML::OPML::LIBXML (3)

.ds Aq ’

NAME

XML::OPML::LibXML - Parse OPML document with LibXML parser

CONTENTS

SYNOPSIS



  use XML::OPML::LibXML;

  my $parser = XML::OPML::LibXML->new;
  my $doc    = $parser->parse_file($opml_file);

  # Alternatively, you can create Document object using XML::LibXML::Document
  use XML::LibXML;
  my $dom = XML::LibXML->new->parse_file($opml_file);
  my $doc = XML::OPML::LibXML::Document->new_from_doc($dom);

  # OPML document head properties
  $doc->title;
  $doc->date_created;
  $doc->date_modified;
  $doc->owner_name;

  # XML::OPML::LibXML::Outline
  my @outline = $doc->outline;
  for my $outline (@outline) {
      my $attrs = $attr->attrs;      # hashref
      $outline->title;
      $outline->text;
      if ($outline->is_container) {
          my @outline = $outline->children;
          # do some recursive stuff, see also walkdown()
      } else {
          $outline->type;
          $outline->xml_url;
          $outline->html_url;
      }
  }

  # depth-first walkdown the tree
  $doc->walkdown(\&callback);
  sub callback {
      my $outline = shift;
      # ...
  }



DESCRIPTION

XML::OPML::LibXML is an OPML parser written using XML::LibXML. This module is part of spin-off CPANization of Plagger plugins.

For now, all this module does is just parsing an OPML document. The API is very simple and limited to low-level access, yet.

<B>NOTEB>: This module is not designed to be a drop-in replacement of XML::OPML.

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

XML::LibXML, XML::OPML, Plagger
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XML::OPML::LIBXML (3) 2006-10-11

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.