CGI::Form2XML - Render CGI form input as XML
use CGI::Form2XML; my $x = CGI::Form2XML->new(); $x->ns_prefix("nfd"); print $x->asXML();
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.
The constructor for the class. Returns a blessed object of type CGI::Form2XML. Any arguments provided will be passed to the constructor of CGI.
Returns the XML document that represents this CGI request. It takes a hashref of arguments whose keys are :
The namespace prefix that should be used for this document. The default is no namespace.
The URL that describes this namespace - the default is 'http://schemas.gellyfish.com/FormData', there is currently nothing at this URL.
If this is set to a true value then the 'header' information will not be emitted by asXML().
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.
If this is set to a true value then the 'header' information will not be emitted in the output document.
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.
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.
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.
Jonathan Stowe <firstname.lastname@example.org>
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.