Jonathan Stowe > CGI-Form2XML > CGI::Form2XML

Download:
CGI-Form2XML-1.4.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.4   Source  

NAME ^

CGI::Form2XML - Render CGI form input as XML

SYNOPSIS ^

   use CGI::Form2XML;


   my $x = CGI::Form2XML->new();

   $x->ns_prefix("nfd");

   print $x->asXML();

DESCRIPTION ^

This module provides a method of taking CGI form input and turning it into XML for further processing by another application or storage. Unlike modules such CGI::XML and CGI::XMLForm it produces XML to a fixed schema whose structure is not influenced by the form input. If flexibility as to the structure of the XML data is required you will probably want to consider one of the other modules.

The schema is included in the distribution of this module as "xmlform.xsd".

The module inherits from the CGI module in order to get access to the CGI parameters, so any of the methods of that module can be used.

METHODS

new

The constructor for the class. Returns a blessed object of type CGI::Form2XML. Any arguments provided will be passed to the constructor of CGI.

asXML

Returns the XML document that represents this CGI request. It takes a hashref of arguments whose keys are :

ns_prefix

The namespace prefix that should be used for this document. The default is no namespace.

ns_url

The URL that describes this namespace - the default is 'http://schemas.gellyfish.com/FormData', there is currently nothing at this URL.

omit_info

If this is set to a true value then the 'header' information will not be emitted by asXML().

ns_prefix

Gets and/or sets the namespace prefix as described as an argument to asXML() above.

Returns and/or sets the namespace URL for the document as described as an argument to asXML() above.

omit_info

If this is set to a true value then the 'header' information will not be emitted in the output document.

destination

This is used to set the value of the 'destination' element in the header information of the output document. This may be a URL, email address or some other identifier. Its content is entirely application specific.

sess_id

This sets the 'session id' for this CGI request, it is intended to be a unique identifier for this request and may take the form of a UUID or an MD5 hash or something similar. Its use is application specific.

owner

This sets the value of the 'owner' element in the header information. This is intended to be the e-mail address indicating the contact for this application. The usage of this information is application specific.

AUTHOR ^

    Jonathan Stowe <jns@gellyfish.com>

COPYRIGHT ^

This module is free software. It can be used and distributed under the same terms as Perl itself. The Perl license can be found in the file README in the Perl source distribution.

SEE ALSO ^

  CGI::XMLForm,  CGI::XML
syntax highlighting: