Forum Moderators: open

Message Too Old, No Replies

Convert from XML to HTML Form

         

kate_d

11:19 am on May 6, 2005 (gmt 0)

10+ Year Member



I have an XML schema file (.xsd) and I need to create an HTML form to gather data to populate a corresponding XML file. Does anyone know the best way to do this? I have been reading about xforms which seem to be what I need but as far as I can tell they are not supported by any browsers at the moment which makes them a bit useless?

choster

8:15 pm on May 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello kate, no one has responded yet so I'll jump in. I hope you don't take this the wrong way, but I'll try to step through how the pieces fit together, and then perhaps someone can offer a solution.

An XML schema defines what elements go into an XML file and in what structure; in this case, it may be helpful to think of it as a document which lists all the fields that go into a database record. For instance, it might stipulate the top-level element is <member>, which contains <name>, <zipcode>, and <lastpurchase>, and <lastpurchase> contains <date> and <amount>.

Since XForms has limited browser support, you'll need a script running on your server which will accept form input and generate properly structured XML from it. The input form is the same as any other input form-- just provide fields for the data to be entered. The work of formatting the XML is all in the script-- no transformation is required.

On the xsl-list archives, see [biglist.com...]

As for where to get such a script, it's outside my skillset, but it's a fairly trivial task.