XML::S...espace(3pm)
πΈ NAME πΈ
okay so bestie, meet XML::Stream::Namespace β the object that makes defining Namespaces easier in XML::Stream. This is the XML::S...espace(3pm) page, and yep, it's User Contributed Perl Documentation. Main-character helper-package energy fr fr π
.
β¨ 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. That's the whole synopsis, and it ate. π«Ά
π¦ DESCRIPTION π¦
This module allows you to set and read elements from an XML::Stream Namespace. Lowkey its whole job, no cap.
π METHODS π
Here's the exact method menu, bestie β keep every string exactly as written:
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 π
bestie, here's the whole little scenario, verbatim so nothing gets lost in the group chat:
$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. iconic maintainer behavior, honestly π«Ά.
π COPYRIGHT π
Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/.
This module licensed under the LGPL, version 2.1. periodt π.
mwah π β this page is from perl v5.42.0, dated 2015-02-06, and it's the XML::S...espace(3pm) manual page. bye bestie π§
π¦ where this page comes from
- opensuse-leap 16.0: perl-XML-Stream 1.24-bp160.1.3 Β· LGPL-2.1+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms