Hi,

if it is coming as a HTTP request you can take the request object and convert it into an XML message.

Step1: Get the request object(HTTPRequest).
Step2: From the request object get the name value pairs using the methods of the HTTPRequest     object.
Step3: Form the XML the way you want.

you can actually write java methods where in you can just input the name value pair as parameters and it builds the XML and keeps on appending the new name value pairs.

if you want more details please write back.

--RP

-----Original Message-----
From: David Lindquist [mailto:dlindquist@softroots.com]
Sent: Wednesday, September 12, 2001 2:40 PM
To: general@xml.apache.org
Subject: form field data "bound" to XML nodes?


Hello,

Is there an easy way for form field data sent from a web page to populate
nodes in an XML file? I am trying to deal with the problem of
non-hierarchical data (name/value pairs sent from the form) having to find
its way into a hierarchical data structure (the XML file) on the server
side. To my knowledge, web browsers can only send form data via HTTP as
name/value pairs.

My only thoughts so far have been to devise a (ridiculously) complex naming
scheme for the form element names that would somehow correspond to an XPath
expression, or to build a JavaScript object representing the data structure
that could be serialized into XML and sent as the sole name/value pair.
These seem to me to be very kludgey.

There must be an easier way. Any ideas?

Dave


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org