++ed by:

1 non-PAUSE user.

Daisuke Maki


XML::RSS::LibXML::MagicElement - Represent A Non-Trivial RSS Element


  us XML::RS::LibXML::MagicElement;
  my $xml = XML::RSS::LibXML::MagicElement->new(
    content => $textContent,
    attributes => \@attributes


This module is a handy object that allows users to access non-trivial RSS elements in XML::RSS style. For example, suppose you have an RSS feed with an element like the following:

    <tag attr1="foo" attr2="bar">baz</tag>

While it is simple to access the title element like this:


It was slightly non-trivial for the second tag. With this module, <tag> is parsed as a XML::RSS::LibXML::MagicElement object and then you can access all the elements like so:

  $rss->{channel}->{tag};  # "baz"
  $rss->{channel}->{tag}->{attr1}; # "foo"
  $rss->{channel}->{tag}->{attr2}; # "bar"


Copyright 2005 Daisuke Maki <dmaki@cpan.org>. All rights reserved.

Development partially funded by Brazil, Ltd. <http://b.razil.jp>