NAME
XML::eXistDB - handle the eXist pure XML database
INHERITANCE
XML::eXistDB
is a XML::Compile::Cache
is a XML::Compile::Schema
is a XML::Compile
SYNOPSIS
# You want to talk to eXist via a protocol. Read that manpage
use XML::eXistDB::RPC;
my $db = XML::eXistDB::RPC->new(...);
DESCRIPTION
There are many database which support XML and Xquery. Quite a number of them translate XML into tables and Xquery into SQL statements. The eXist database however, is a pure XML/Xquery database. Website: http://exist-db.org
The XML::eXistDB
distribution contains the following modules:
- .
XML::eXistDB
focuses on processing eXist (configuration) files - .
XML::eXistDB::Util
contains convenience functions and constants - .
XML::eXistDB::RPC
implements the large XML-RPC API to speak to an eXist daemon
The "REST" API for eXist is very different from the XML-RPC API, so there is no chance on a common base-class. The XML-RPC API is probably quite close to the XML:DB standard, but for the moment, no attempts are made to unify the implementation to facilitate different XML databases back-ends.
METHODS
Constructors
XML::eXistDB->new(OPTIONS)
Option --Defined in --Default
allow_undeclared XML::Compile::Cache <true>
any_element XML::Compile::Cache 'SKIP_ALL'
block_namespace XML::Compile::Schema []
hook XML::Compile::Schema undef
hooks XML::Compile::Schema []
ignore_unused_tags XML::Compile::Schema <false>
key_rewrite XML::Compile::Schema []
opts_readers <sloppy ints and floats>
opts_rw XML::Compile::Cache []
opts_writers XML::Compile::Cache []
prefixes XML::Compile::Cache <smart>
schema_dirs XML::Compile undef
typemap XML::Compile::Schema {}
. allow_undeclared => BOOLEAN
. any_element => CODE|'TAKE_ALL'|'SKIP_ALL'|'ATTEMPT'|'SLOPPY'
. block_namespace => NAMESPACE|TYPE|HASH|CODE|ARRAY
. hook => ARRAY-WITH-HOOKDATA | HOOK
. hooks => ARRAY-OF-HOOK
. ignore_unused_tags => BOOLEAN|REGEXP
. key_rewrite => HASH|CODE|ARRAY-of-HASH-and-CODE
. opts_readers => []
. opts_rw => HASH|ARRAY-of-PAIRS
. opts_writers => HASH|ARRAY-of-PAIRS
. prefixes => HASH|ARRAY-of-PAIRS
. schema_dirs => DIRECTORY|ARRAY-OF-DIRECTORIES
. typemap => HASH
Accessors
$obj->addHook(HOOKDATA|HOOK|undef)
$obj->addHooks(HOOK, [HOOK, ...])
$obj->addKeyRewrite(PREDEF|CODE|HASH, ...)
$obj->addSchemaDirs(DIRECTORIES|FILENAME)
XML::eXistDB->addSchemaDirs(DIRECTORIES|FILENAME)
$obj->addSchemas(XML, OPTIONS)
$obj->addTypemap(PAIR)
$obj->addTypemaps(PAIRS)
$obj->allowUndeclared([BOOLEAN])
$obj->blockNamespace(NAMESPACE|TYPE|HASH|CODE|ARRAY)
$obj->hooks
$obj->prefix(PREFIX)
$obj->prefixFor(URI)
$obj->prefixed(TYPE)
$obj->prefixes([PAIRS|ARRAY|HASH])
$obj->useSchema(SCHEMA, [SCHEMA])
Compilers
$obj->compile(('READER'|'WRITER'), TYPE, OPTIONS)
$obj->compileAll(['READER'|'WRITER'|'RW', [NAMESPACE]])
XML::eXistDB->dataToXML(NODE|REF-XML-STRING|XML-STRING|FILENAME|FILEHANDLE|KNOWN)
$obj->reader(TYPE|NAME, OPTIONS)
$obj->template('XML'|'PERL', ELEMENT, OPTIONS)
$obj->writer(TYPE|NAME)
Administration
$obj->declare('READER'|'WRITER'|'RW', TYPE|ARRAY-of-TYPES, OPTIONS)
$obj->elements
$obj->findName(NAME)
$obj->findSchemaFile(FILENAME)
XML::eXistDB->findSchemaFile(FILENAME)
$obj->importDefinitions(XMLDATA, OPTIONS)
$obj->knownNamespace(NAMESPACE|PAIRS)
XML::eXistDB->knownNamespace(NAMESPACE|PAIRS)
$obj->namespaces
$obj->printIndex([FILEHANDLE], OPTIONS)
$obj->types
$obj->walkTree(NODE, CODE)
Administration
Collection configuration (.xconf)
$obj->createCollectionConfig(DATA, OPTIONS)
The DATA structure should provide the needs for an collection configuration file, in the shape XML::Compile
expects based on the schema. See the template/collection.xconf
, which is part of the distribution.
Option --Default
beautify <true>
. beautify => BOOLEAN
$obj->decodeXML(STRING)
Received is a STRING produced by the server. Decode it, into the most useful Perl data structure.
DETAILS
SEE ALSO
This module is part of XML-ExistDB distribution version 0.11, built on June 03, 2010. Website: http://perl.overmeer.net/xml-compile/
All modules in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, and XML::Rewrite, XML::ExistDB, XML::LibXML::Simple.
Please post questions or ideas to the mailinglist at http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile For life contact with other developers, visit the #xml-compile
channel on irc.perl.org
.
LICENSE
Copyrights 2010 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html