NAME
XML::XUpdate::LibXML - Simple implementation of XUpdate format
SYNOPSIS
use XML::LibXML; use XML::XUpdate::LibXML;
$parser = XML::LibXML->new(); $dom = $parser->parse_file("mydoc.xml"); $actions = $parser->parse_file("update.xml");
$xupdate = XML::LibXML::XUpdate->new(); $xupdate->process($dom->getDocumentElement(), $actions); print $dom->toString(),"\n";
DESCRIPTION
This module implements the XUpdate format described in XUpdate Working Draft from 2000-09-14 (http://www.xmldb.org/xupdate/xupdate-wd.html). The implementation is based on XML::LibXML DOM API.
new
my $xupdate = XML::LibXML::XUpdate->new();
Creates a new XUpdate object. You may use this object to update several different DOM trees using several different XUpdate descriptions. The advantage of it is that an xupdate object remembers values all variables declared in XUpdate documents.
$xupdate-
process($document_dom,$xupdate_dom)>
This function takes two DOM trees as its arguments. It works by updating the first tree according to all XUpdate commands included in the second one. All XUpdate commands must be children of the root element of the second tree and must all belong to XUpdate namespace "http://www.xmldb.org/xupdate". The namespace URI may be changed with set_namespace method.
$xupdate-
set_namespace($URI)>
You may use this method to change the namespace of XUpdate elements. The default namespace is "http://www.xmldb.org/xupdate".
$xupdate-
namespace()>
Returns XUpdate namespace URI used by XUpdate processor to identify XUpdate commands.
EXPORT
None.
AUTHOR
Petr Pajas, pajas@matfyz.cz