NAME
WAP::wbxml - Binarization of XML file
SYNOPSIS
use XML::DOM;
use WAP::wbxml;
$parser = new XML::DOM::Parser;
$doc_xml = $parser->parsefile($infile);
$rules = WbRules->Load();
$wbxml = new WbXml($rules,$publicid);
$output = $wbxml->compile($doc_xml,$encoding);
DESCRIPTION
This module implements binarisation of XML file according the specification :
WAP - Wireless Application Protocol / Binary XML Content Format Specification / Version 1.3 WBXML (15th May 2000 Approved)
The XML input file must refere to a DTD with a public identifier.
The file WAP/wbrules.xml configures this tool for all known DTD.
This module needs Data::Dumper, I18N::Charset and XML::DOM modules.
WAP Specifications, including Binary XML Content Format (WBXML) are available on <http://www.wapforum.org/>.
- new
-
$wbxml = new WbXml($rules,$publicid);
Create a instance of WBinarizer for a specified kind of DTD.
If the DTD is not known in the rules, default rules are used.
- compile
-
$output = $wbxml->compile($doc_xml,$encoding);
Compiles a XML document.
- outfile
-
$filename = $wbxml->outfile($infile);
Builds output filename with the good extension.
- Load
-
$rules = WbRules->Load();
Loads rules from WAP/wbrules.xml or WAP/wbrules.pl.
WAP/wbrules.pl is a serialized version (Data::Dumper).
WAP/wbrules.xml supplies rules for WAP files, but it could extended to over XML applications.
SEE ALSO
xmlc, WAP::SAXDriver::wbxml.pm
COPYRIGHT
(c) 2000-2002 Francois PERRAD, France. All rights reserved.
This program (WAP::wbxml.pm and the internal DTD of wbrules.xml) is distributed under the terms of the Artistic Licence.
The WAP Specification are copyrighted by the Wireless Application Protocol Forum Ltd. See <http://www.wapforum.org/what/copyright.htm>.
AUTHOR
Francois PERRAD <perrad@besancon.sema.slb.com>