ANN: HTML Form to XML module

Matthew Sergeant (EML) Matthew.Sergeant at eml.ericsson.se
Wed Jan 13 09:55:01 GMT 1999


Although this is a perl module, I hope others will see the usefulness of
this, and perhaps it can become a standard.

I've created a module that is a subclass of CGI.pm which takes HTML Form
output and generates XML. The aim of this module is to be able to generate
_arbitrary_ XML, not a standard (read: less useful) DTD. In order to be able
to do this the form element names use a standard naming convention, based
around XSL/XQL.

For example, the following form elements:

<input type="text" name="/table/@width" value="100%">
<input type="text" name="tr/td" value="val1">

will create the following XML:

<table width="100%">
	<tr>
		<td>val1</td>
	</tr>
</table>

The benefit of this naming scheme is it should be possible (this has been
demonstrated) to use an XQL processor to read in XML, and create these form
values directly, this way you can have an XML editor in your browser with
very little work.

The module also has limited (although much more planned) support for
ignoring form elements, using a namespace xmlcgi:ignore, so that you can use
them for things other than generating XML.

I'm very interested in feedback on this module, although I realise that most
people here are not primarily Perl developers.

I also have a much more extensive white paper available on this module, and
more complex documentation is available in the archive should anyone require
that.

Find it temporarily at:
http://www.fastnetltd.ndirect.co.uk/Perl/CGI-ToXML-0.03.tar.gz

Matt.
--
http://come.to/fastnet
Perl on Win32, PerlScript, ASP, Database, XML
GCS(GAT) d+ s:+ a-- C++ UL++>UL+++$ P++++$ E- W+++ N++ w--@$ O- M-- !V 
!PS !PE Y+ PGP- t+ 5 R tv+ X++ b+ DI++ D G-- e++ h--->z+++ R+++


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list