application/x-www-form+xml

This form:

<form action="http://example.com/formprocessor"
      enctype="application/x-www-form+xml"
      method="post">
<label>Family name:	
    <input name='family' />
</label></p>
<p><label>Given name:	
    <input name='given' />
</label></p>
<p><label>Address:	
    <input name='address' />
</label></p>
<p><label>Zip code:	
    <input name='zip' />
</label></p>
<p><label>Email:	
    <input name='email' />
</label></p>
<p><label>Telephone:	
    <input name='telephone' />
</label></p>
<p><label>Comments:	
    <textarea name='comments' />
</label></p>
<p><label><input type="submit" value="Send data" /></label></p>
</form>

Generates this submission:

Content-Type: application/x-www-form+xml

<formdata xmlns="http://n.whatwg.org/formdata">
 <field name="family" index="0">Smith</field>
 <field name="given" index="0">John</field>
 <field name="address" index="0">123 Nowhere Str.</field>
 <field name="zip" index="0">10003</field>
 <field name="email" index="0">jsmith456@aol.com</field>
 <field name="telephone" index="0">212-555-3248</field>
 <field name="comments" index="0">Web Forms 2.0 is cool.</field>
</formdata>

The index increments as necessary to handle repeating fields with the same name.


Previous | Next | Top | Cafe con Leche

Copyright 2007 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified February 3, 2007