Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::namespacefactory(3pm) [debian man page]

NamespaceFactory(3pm)					User Contributed Perl Documentation				     NamespaceFactory(3pm)

NAME
XML::NamespaceFactory - Simple factory objects for SAX namespaced names SYNOPSIS
use XML::NamespaceFactory; my $FOO = XML::NamespaceFactory->new('http://foo.org/ns/'); print $FOO->title; # {http://foo.org/ns/}title print $FOO->{'bar.baz-toto'}; # {http://foo.org/ns/}bar.baz-toto ABSTRACT
A number of accessors for namespaces in SAX use the JClark notation, {namespace}local-name. Those are a bit painful to type repeatedly, and somewhat error-prone as hash keys. This module makes life easier. DESCRIPTION
Simply create a new XML::NamespaceFactory object with the namespace you wish to use as its single parameter. If you wish to use the empty namespace, simply pass in an empty string (but undef will not do). Then, when you want to get a JClark name, call a method on that object the name of which is the local name you wish to have. It'll return the JClark notation for that local name in your namespace. Unfortunately, some local names legal in XML are not legal in Perl. To circumvent this, you can use the hash notation in which you access a key on the object the name of which is the local name you wish to have. This will work just as the method call name but will accept more characters. Note that it does not check that the name you ask for is a valid XML name. This form is more general but slower. If this is not clear, hopefully the SYNOPSIS should help :) MAINTAINER
Chris Prather <chris@prather.org> AUTHOR
Robin Berjon based on a suggestion by Ken MacLeod. COPYRIGHT AND LICENSE
Copyright 2003-2010 by Robin Berjon This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-04-13 NamespaceFactory(3pm)

Check Out this Related Man Page

BufferText(3pm) 					User Contributed Perl Documentation					   BufferText(3pm)

NAME
XML::Filter::BufferText - Filter to put all characters() in one event SYNOPSIS
my $h = SomeHandler->new; my $f = XML::Filter::BufferText->new( Handler => $h ); my $p = SomeParser->new( Handler => $f ); $p->parse; DESCRIPTION
This is a very simple filter. One common cause of grief (and programmer error) is that XML parsers aren't required to provide character events in one chunk. They can, but are not forced to, and most don't. This filter does the trivial but oft-repeated task of putting all characters into a single event. Note that this won't help you cases such as: <foo> blah <!-- comment --> phubar </foo> In the above case, given the interleaving comment, there will be two "character()" events. This may be worked around in the future if there is demand for it. An interesting way to use this filter, instead of telling users to use it, is to return it from your handler's constructor, already configured and all. That'll make the buffering totally transparent to them ("XML::SAX::Writer" does that). AUTHOR
Robin Berjon, robin@knowscape.com COPYRIGHT
Copyright (c) 2001-2002 Robin Berjon. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
XML::SAX::*, XML::Generator::*, XML::Handler::*, XML::Filter::* perl v5.10.0 2003-07-04 BufferText(3pm)
Man Page

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

LS with spaces

Hi! I'm fairly new to UNIX so don't mention that my question is stupid. I have many problems with spaces in folders and files names. Let's say I have the following files: toto.txt this is toto.txt in /usr/local/this is a test/ Why the following commands works: ls "/usr/local/this... (2 Replies)
Discussion started by: darkyoda2
2 Replies

2. Shell Programming and Scripting

Fusion de 2 fichiers

Bonjour, je souhaiterais un script bash fusionnant 2 fichiers tout en virant les doublons. Exemple : fic1 : toto titi fic2 : toto tata Résultat souhaité, fic 3 : toto titi tata Merci. (1 Reply)
Discussion started by: Celmar
1 Replies

3. Shell Programming and Scripting

Merging several line in one based on an occurrence

Hi, I try to gather several line in one based on the first column. For exemple : toto;1;2;3 toto;4;5;6 toto;7;8;9 etc... (Number of lines not predefined) ruru;a;b;c ruru;d;e;f ruru;g;h;i ... I'm trying to get : toto;1;2;3;4;5;6;7;8;9... ruru;a;b;c;d;e;f;g;h;i...Thank you. (2 Replies)
Discussion started by: xanthos
2 Replies