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
XML::XBEL(3) User Contributed Perl Documentation XML::XBEL(3)
 

XML::XBEL - OOP for reading and writing XBEL documents.

 # creating an XBEL document
 use XML::XBEL;
 use XML::XBEL::Folder;
 use XML::XBEL::Bookmark;
 my $xbel = XML::XBEL->new();
 $xbel->new_document({title=>"My Bookmarks"});
 $xbel->add_bookmark({href  => "http://foo.com",
                      title => "foo",
                      desc  => "bar"});
 my $folder1 = XML::XBEL::Folder->new({title => "comp"});
 my $folder2 = XML::XBEL::Folder->new({title => "lang"});
 my $folder3 = XML::XBEL::Folder->new({title => "perl"});
 my $bm = XML::XBEL::Bookmark->new({"title=>"misc"});
 $bm->href("http://groups.google.com/groups?q=comp.lang.perl.misc");
 $folder3->add_bookmark($bm);
 $folder2->add_folder($folder3);
 $folder1->add_folder($folder2);
 $xbel->add_folder($folder1);
 print $xbel->toString();
 # parsing an XBEL document
 use XML::XBEL;
 my $xbel = XML::XBEL->new();
 $xbel->parse_file($file);
 
 foreach my $bm ($xbel->bookmarks()) {
     print sprintf("%s points to %s\n",
                   $bm->title(),
                   $bm->href());
 }

OOP for reading and writing XBEL files.

Returns an XML::XBEL object.

Returns true or false.

Returns true or false.

Valid arguments are :
title
String.
desc
String.
info
Hash ref, with the following key/value pairs :
owner
Array ref.
Returns true or false.

Get/set the title for an XBEL document.
Returns a string when called with no arguments; otherwise returns true or false.

Get/set the description for an XBEL document.
Returns a string when called with no arguments; otherwise returns true or false.

Get/set the metadata for an XBEL document.
Valid args are :
owner
Array reference
Returns an array reference when called with no arguments; otherwise returns true or false.

Returns a list of child XML::XBEL::Bookmark objects.
Where $recursive is a boolean indicating whether to return all the bookmarks in an XBEL document or only its immediate children.

Returns a list of child XML::XBEL::Folder objects.
Where $recursive is a boolean indicating whether to return all the folders in an XBEL document or only its immediate children.

Returns a list of child XML::XBEL::Alias objects.
Where $recursive is a boolean indicating whether to return all the aliases in an XBEL document or only its immediate children.

Returns an XML::XBEL::Bookmark or XML::XBEL::Folder object whose id attribute matches $id.

Returns a list of XML::XBEL::Bookmark objects whose href attribute matches $href.

Add a new bookmark to an XBEL document.
If passed a hash ref, valid arguments are the same as those defined for the XML::XBEL::Bookmark object constructor.

Add a new folder to an XBEL document.
If passed a hash ref, valid arguments are the same as those defined for the XML::XBEL::Folder object constructor.

Add a new alias to an XBEL document.
If passed a hash ref, valid arguments are the same as those defined for the XML::XBEL::Alias object constructor.

Add a new separator to an XBEL document.

Generate SAX events for the XBEL object.

1.4

$Date: 2005/04/02 20:54:52 $

Aaron Straup Cope <ascope@cpan.org>

XML::XBEL::Folder
XML::XBEL::Bookmark
XML::XBEL::Alias
XML::XBEL::Separator

It's possible. Please report all bugs via http://rt.cpan.org

Copyright (c) 2004 Aaron Straup Cope. All rights reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.
2019-01-02 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

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