-
-
28 Apr 2021 18:24:18 UTC
- Distribution: XML-XSH2
- Module version: 2.2.9
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (1)
- Testers (101 / 0 / 0)
- Kwalitee
Bus factor: 3- License: unknown
- Activity
24 month- Tools
- Download (342.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Petr Pajas (pajas@matfyz.cz)
- Dependencies
- IO::Scalar
- Parse::RecDescent
- Term::ReadLine
- Term::ReadLine::Perl
- URI
- XML::Filter::DOMFilter::LibXML
- XML::LibXML
- XML::LibXML::Common
- XML::LibXML::Iterator
- XML::LibXML::XPathContext
- XML::LibXSLT
- XML::SAX::Writer
- XML::XUpdate::LibXML
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
XML::XSH2 - A powerfull scripting language/shell for XPath-based editing of XML
SYNOPSIS
use XML::XSH2; xsh(<<'__XSH__'); # ... XSH Language commands (example borrowed from Kip Hampton's article) ... $sources := open "perl_channels.xml"; # open a document from file $merge := create "news-items"; # create a new document foreach $sources//rss-url { # traverse the sources document my $src := open @href; # load the URL given by @href attribute map { $_ = lc($_) } //*; # lowercase all tag names xcopy $src//item # copy all items from the src document into $merge/news-items[1]; # into the news-items element in merge document close $src; # close src document (not mandatory) }; close $sources; save --file "files/headlines.xml" $merge; # save the resulting merge document close $merge; __XSH__
REQUIRES
XML::LibXML, XML::XUpdate::LibXML
EXPORTS
xsh()
DESCRIPTION
This module implements XSH sripting language. XSH stands for XML (editing) SHell. XSH language is documented in XSH and on http://xsh.sourceforge.net/documentation.html.
The distribution package of XML::XSH2 module includes XSH shell interpreter called
xsh
(see xsh). To use it interactively, runxsh -i
.xsh_init
Initialize the XSH language parser and interpreter.
xsh
Execute commands in XSH language.
AUTHORS
Petr Pajas, pajas@matfyz.cz E. Choroba, choroba@matfyz.cz
SEE ALSO
Module Install Instructions
To install XML::XSH2, copy and paste the appropriate command in to your terminal.
cpanm XML::XSH2
perl -MCPAN -e shell install XML::XSH2
For more information on module installation, please visit the detailed CPAN module installation guide.