XML::Stream::NamespaceXML::Stream::Namespace is a Perl object to make defining Namespaces easier in XML::Stream. | |
Download |
XML::Stream::Namespace Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ryan Eatmon
- Publisher web site:
- http://search.cpan.org/~reatmon/
XML::Stream::Namespace Tags
XML::Stream::Namespace Description
XML::Stream::Namespace is a Perl object to make defining Namespaces easier in XML::Stream. XML::Stream::Namespace is a Perl object to make defining Namespaces easier in XML::Stream.SYNOPSISXML::Stream::Namespace is a helper package to XML::Stream. It provides a clean way of defining Namespaces for XML::Stream to use when connecting. 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 = new XML::Stream::Namespace("mynamspace"); $myNamespace->SetXMLNS("http://www.mynamespace.org/xmlns"); $myNamespace->SetAttributes(foo=>"bar", bob=>"vila"); $stream = new XML::Stream; $stream->Connect(name=>"foo.bar.org", port=>1234, namespace=>"foo:bar", namespaces=>); # # The above Connect will send the following as the opening string # of the stream to foo.bar.org:1234... # # # Requirements: · Perl
XML::Stream::Namespace Related Software