Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::stream::namespace(3pm) [debian man page]

XML::Stream::Namespace(3pm)				User Contributed Perl Documentation			       XML::Stream::Namespace(3pm)

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 = 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=>[ $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
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-01-08 XML::Stream::Namespace(3pm)

Check Out this Related Man Page

XML::SAX::ExpatXS(3pm)					User Contributed Perl Documentation				    XML::SAX::ExpatXS(3pm)

NAME
XML::SAX::ExpatXS - Perl SAX 2 XS extension to Expat parser SYNOPSIS
use XML::SAX::ExpatXS; $handler = MyHandler->new(); $parser = XML::SAX::ExpatXS->new( Handler => $handler ); $parser->parse_uri($uri); #or $parser->parse_string($xml); DESCRIPTION
XML::SAX::ExpatXS is a direct XS extension to Expat XML parser. It implements Perl SAX 2.1 interface. See http://perl-xml.sourceforge.net/perl-sax/ for Perl SAX API description. Any deviations from the Perl SAX 2.1 specification are considered as bugs. Features The parser behavior can be changed by setting features. $parser->set_feature(FEATURE, VALUE); XML::SAX::ExpatXS provides these adjustable features: "http://xmlns.perl.org/sax/join-character-data" Consequent character data are joined (1, default) or not(0). "http://xmlns.perl.org/sax/ns-attributes" Namespace attributes are reported as common attributes (1, default) or not(0). "http://xmlns.perl.org/sax/xmlns-uris" When set on, xmlns and xmlns:* attributes are put into namespaces in a Perl SAX traditional way; xmlns attributes are in no namespace while xmlns:* attributes are in the "http://www.w3.org/2000/xmlns/" namespace. This feature is set to 1 by default. "http://xml.org/sax/features/xmlns-uris" This feature applies if and only if the "http://xmlns.perl.org/sax/xmlns-uris" feature is off. Then, xmlns and xmlns:* attributes are both put into no namespace (0, default) or into "http://www.w3.org/2000/xmlns/" namespace(1). "http://xmlns.perl.org/sax/locator" The document locator is updated (1, default) for ContentHadler events or not(0). "http://xmlns.perl.org/sax/recstring" A recognized string (the text string currently processed by this XML parser) is either maintained as $parser->{ParseOptions}{RecognizedString} (1) or not (0, default). "http://xml.org/sax/features/external-general-entities" Controls whether this parser processes external general entities (1, default) or not(0). "http://xml.org/sax/features/external-parameter-entities" Controls whether this parser processes external parameter entities including an external DTD subset(1) or not (0, default). Constructor Options Apart from features, the behavior of this parser can also be changed with options to the constructor. ParseParamEnt ParseParamEnt => 1 This option meaning is exactly the same as the "http://xml.org/sax/features/external-parameter-entities" feature. The option is supported only because of the compatibility with older versions of this module. Turned off by default. NoExpand NoExpand => 1 No internal entities are expanded if this option is turned on. Turned off by default. Read-only Properties ExpatVersion This property returns a version of linked Expat library, for example expat_1.95.7. AUTHORS
Petr Cimprich <petr AT gingerall DOT org> (maintainer) Matt Sergeant <matt AT sergeant DOT org> perl v5.14.2 2011-04-12 XML::SAX::ExpatXS(3pm)
Man Page