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

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:

  <channel>
    <title>Example</title>
    <tag attr1="foo" attr2="bar">baz</tag>
    ...
  </channel>

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

  $rss->{channel}->{title};

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"

Create a new MagicElement object.

Returns the list of attributes associated with this element

Returns the string representation of this object. By default we use the "text content" of the found tag, but for XML::RSS compatibility, we use the concatenation of the attributes if no content is found.

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

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

2022-04-12 perl v5.32.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.