Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

XML::Stream::Namespace

Name XML::Stream::Namespace
Version 1.24
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/XML/Stream/Namespace.pm
Is Core No
Search CPAN for this module XML::Stream::Namespace
Documentation XML::Stream::Namespace
Module Details XML::Stream::Namespace

NAME

XML::Stream::Namespace - Object to make defining Namespaces easier in XML::Stream.


SYNOPSIS

XML::Stream::Namespace is a helper package to XML::Stream. It provides a clean way of defining Namespaces for XML::Stream to use when connecting.


DESCRIPTION

  This module allows you to set and read elements from an XML::Stream
  Namespace.


METHODS

  SetNamespace("mynamespace");
  SetXMLNS("http://www.mynamespace.com/xmlns";);
  SetAttributes(attrib1=>"value1",
                attrib2=>"value2");
  GetNamespace() returns "mynamespace"
  GetXMLNS() returns "http://www.mynamespace.com/xmlns";
  GetAttributes() returns a hash ( attrib1=>"value1",attrib2=>"value2")
  GetStream() returns the following string:
    "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 
     mynamespace:attrib1='value1' 
     mynamespace:attrib2='value2'"


EXAMPLES

  $myNamespace = XML::Stream::Namespace->new("mynamspace");
  $myNamespace->SetXMLNS("http://www.mynamespace.org/xmlns";);
  $myNamespace->SetAttributes(foo=>"bar",
                              bob=>"vila");
  $stream = XML::Stream->new;
  $stream->Connect(name=>"foo.bar.org",
                   port=>1234,
                   namespace=>"foo:bar",
                   namespaces=>[ $myNamespace ]);
  #
  # The above Connect will send the following as the opening string
  # of the stream to foo.bar.org:1234...
  #
  #   <stream:stream 
  #    xmlns:stream="http://etherx.jabber.org/streams";
  #    to="foo.bar.org"
  #    xmlns="foo:bar" 
  #    xmlns:mynamespace="http://www.mynamespace.org/xmlns";
  #    mynamespace:foo="bar"
  #    mynamespace:bob="vila">
  #


AUTHOR

Written by Ryan Eatmon in February 2000 Idea By Thomas Charron in January of 2000 for http://etherx.jabber.org/streams/

Currently maintained by Darian Anthony Patrick.


COPYRIGHT

Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/

This module licensed under the LGPL, version 2.1.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024