.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::Stream::Namespace 3" .TH XML::Stream::Namespace 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME XML::Stream::Namespace \- Object to make defining Namespaces easier in XML::Stream. .SH SYNOPSIS .IX Header "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. .SH DESCRIPTION .IX Header "DESCRIPTION" .Vb 2 \& This module allows you to set and read elements from an XML::Stream \& Namespace. .Ve .SH METHODS .IX Header "METHODS" .Vb 4 \& 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=\*(Aqhttp://www.nynamespace.com/xmlns\*(Aq \& mynamespace:attrib1=\*(Aqvalue1\*(Aq \& mynamespace:attrib2=\*(Aqvalue2\*(Aq" .Ve .SH EXAMPLES .IX Header "EXAMPLES" .Vb 4 \& $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... \& # \& # \& # .Ve .SH AUTHOR .IX Header "AUTHOR" Written by Ryan Eatmon in February 2000 Idea By Thomas Charron in January of 2000 for http://etherx.jabber.org/streams/ .PP Currently maintained by Darian Anthony Patrick. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 1998\-2004 Jabber Software Foundation http://jabber.org/ .PP This module licensed under the LGPL, version 2.1.