[thelist] HTML Form to XML Document on Apache

dante dante at vianet.net.au
Tue Aug 28 05:01:43 CDT 2001


G'Day All,

I've been experimenting with using a HTML form as part of a (very) basic XML
content management system & I'm stuck :)
I need it to run on Apache so the solutions that I've found using ASP aren't
applicable.
Ideally, what I need is a solution using Perl/CGI that can:

- Upload an image to a specific folder on the server the server & store the
  file's name (eg: "mycat.gif").
- Convert the HTML form output to populate the XML template below
  then append it to an XML document on the server - within the
  <library> elements - including the stored image file's name (
<image_link> ).

Is this possible?
Has anyone encountered anything similar to this?
Is there a better method (PHP perhaps)?
Is it possible to use javascript for a client-side solution?

The form is online here: http://www.vianet.net.au/~dante/xml/input_form.html
[*IE5+ only]

The XML template:
----------------------------------------------------------
<?xml version="1.0"?>
<library>
    <!--    -->
    <book type="" style="" variant="" id="">
        <title></title>
        <sub_title></sub_title>
        <author first_name="" middle_name="" last_name=""></author>
        <illustrator first_name="" middle_name=""
last_name=""></illustrator>
        <image_link></image_link>
        <description></description>
        <subject></subject>
        <isbn></isbn>
        <genre></genre>
        <publisher></publisher>
        <issue></issue>
        <date day="" month="" year="" />
    </book>
</library>
----------------------------------------------------------
*Any* comments are appreciated  : )~

Thanks,
            dante
            Perth, Western Australia
            dante at vianet.net.au
            www.vianet.net.au/~dante





More information about the thelist mailing list