[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Parsing the structure of a form as XML content


html form submit xml

hi,

another possibility is to reconstruct XML instance based on HTML form 
field names. it is straightforward and in case of nested XML elements 
they can be described by giving filed names that are hierarchical i.e. 
simplified XPATH such as <input 
name="param:parameters/input/job-input/x1/"type="text"value="" /> - such 
form field names are pretty much self describing :-).

the main advantage is that such HTML form does not require javascript, 
DHTML, ... - but it is straight HTML form and can be displayed and 
processed on pretty much any HTML browser (we generate XHTML to simplify 
parsing but generated XHTML is 1.0 without any special features).

for example of how such HTML form may look please see GAPP-WRF at 
http://linbox1.extreme.indiana.edu:8356/xwsfg

thanks,

alek

Betty Harvey wrote:

>John:
>
>	About 4 years ago, I did an example of what you want to do.
>The example is available at http://www.eccnet.com/xmledi.  I think
>you might it useful.
>
>Betty
>
>On Sat, 17 May 2003, John Stubbe wrote:
>
>  
>
>>Hi
>>I am stuck with a Form parsing problem.
>>I am building a dynamic form creator system, and my problem is that I would 
>>like to send the whole structure of the form to a server as XML.
>>Is this possible? I have tried to make a small example below. Does anybody 
>>know how I can do this?
>>
>>Thanks in advance
>>
>>Best regards
>>
>>John
>>
>><form action="#">
>><input type="text" value="someValue" />
>><br />
>><select>
>>    <option>value1</option>
>>    <option>value2</option>
>>    <option>value3</option>
>></select>
>><br />
>><textarea>Some text form a text area</textarea>
>><br />
>>Check1: <input type="checkbox" name="check1" value="1">
>>Check2:<input type="checkbox" name="check1" value="2" checked>
>>Check3:<input type="checkbox" name="check1" value="3">
>><br />
>>radio1<input type="radio" name="radio1" value="1">
>>radio2<input type="radio" name="radio1" value="2">
>>radio3<input type="radio" name="radio1" value="3">
>><br />
>><input type="Submit" value="submit" onclick="alert('submit XML')" />
>></form>
>>
>>I would like to recive someting like this:
>>
>><?xml verson="1.0" ?>
>><form>
>><text>someValue</text>
>><select>
>>    <option>value1</option>
>>    <option selected="true">value1</option>
>>    <option>value2</option>
>></select>
>><checkbox name="check1">
>>    <check value="1">Check1</check>
>>    <check id="2">Check2</check>
>>    <check id="3">Check3</check>
>></checkbox>
>><radiobuttons>
>>    <input value="1">radio1</input>
>>    <input value="2">radio2</input>
>>    <input value="3">radio3</input>
>></radiobuttons>
>></form>
>>
>>_________________________________________________________________
>>Nem, sjov og hurtig chat med vennerne med MSN Messenger  
>>http://messenger.msn.dk
>>
>>
>>-----------------------------------------------------------------
>>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>>initiative of OASIS <http://www.oasis-open.org>
>>
>>The list archives are at http://lists.xml.org/archives/xml-dev/
>>
>>To subscribe or unsubscribe from this list use the subscription
>>manager: <http://lists.xml.org/ob/adm.pl>
>>
>>    
>>
>
>  
>


-- 
"Mr. Pauli, we in the back are all agreed that your theory is crazy. 
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.