XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Atif SarfrazSubject: Receiving XML through Form POST request
Author: Atif Sarfraz
Date: 23 Nov 2001 03:15 PM
Hi,

I have generated a form output in Internet Explorer, using XML and applying XSL transformation on it at browser end. Now I want to receive the results back at server end, in the form of XML document. So when a user makes any changes in the form and resubmits the form, I want to get the results at server in the form of XML document.

Is it possible?

Postnext
Atif SarfrazSubject: Receiving XML through Form POST request
Author: Atif Sarfraz
Date: 26 Nov 2001 10:13 AM
Some further information regarding above is that XMLSpy Plugin provides a similar feature, of sending XML document as it is from browser. I am not sure weather we can have the similar output without a plugin.

If some one can sort out a way?

Regards,

Atif Sarfraz

Postnext
(Deleted User) Subject: Re: Receiving XML through Form POST request
Author: (Deleted User)
Date: 26 Nov 2001 10:18 AM
At 03:23 PM 11/23/2001 -0500, you wrote:
>From: "Atif Sarfraz"
>
>Hi,
>
>I have generated a form output in Internet Explorer, using XML and
>applying XSL transformation on it at browser end. Now I want to receive
>the results back at server end, in the form of XML document. So when a
>user makes any changes in the form and resubmits the form, I want to get
>the results at server in the form of XML document.
>
>Is it possible?

Yes, it's possible, but it's not straightforward. A way you can achieve
this is by adding an hidden entry in the form and trap the pressing of the
"Submit" button

{FORM NAME=postForm METHOD=POST ACTION="update.asp"}
{INPUT TYPE=HIDDEN NAME=XML}
... other user visible entries ...
{INPUT TYPE="BUTTON" VALUE="Edit" ONCLICK="submitInfo()"}
{/FORM}

The submitInfo function can then fill the "XML" variable with the XML
representation of the input fields, like in

{script language="JavaScript"}
function submitInfo()
{
var pf = document.postForm;
pf.XML.value = "{?xml version='1.0'?}{title}"+pf.InputField1+.....;
pf.submit();
}
{/script}

If you want to send just the XML representation (without the other input
fields), you can split the FORM entry into 2 (one holding the HIDDEN entry,
the other holding the user-editable fields plus the submit button)

Hope this helps,

Alberto

Postnext
Atif SarfrazSubject: Receiving XML through Form POST request
Author: Atif Sarfraz
Date: 26 Nov 2001 12:17 PM
Hi,

Thanks for a solution, and an interesting way to build XML.

However the problem is that the form I generate is quite dynamic in nature. Its a very complex form, and some sections might appear once or repeatedly, depending upon the XML. So the Form fields are not fixed, and are also quite large around 300 or so.

I was hoping that Internet Explorer might had some functionality that I could use. As if you try to view the source of the resultant html, it still shows you the XML document itself. I doubt there is not a straightforward way to push the modified XML back to server.

Thanks for the help.

Regards,

Atif Sarfraz

Postnext
(Deleted User) Subject: Re: Receiving XML through Form POST request
Author: (Deleted User)
Date: 26 Nov 2001 12:58 PM
At 12:25 PM 11/26/2001 -0500, you wrote:
>From: "Atif Sarfraz"
>
>Hi,
>
>Thanks for a solution, and an interesting way to build XML.
>
>However the problem is that the form I generate is quite dynamic in
>nature. Its a very complex form, and some sections might appear once or
>repeatedly, depending upon the XML. So the Form fields are not fixed, and
>are also quite large around 300 or so.
>
>I was hoping that Internet Explorer might had some functionality that I
>could use. As if you try to view the source of the resultant html, it
>still shows you the XML document itself. I doubt there is not a
>straightforward way to push the modified XML back to server.

If you are looking at an Internet Explorer-only solution, you can use the
XML Data Island feature (you embed the XML inside the HTML page, or point
to the XML on the server); in this way you can edit the XML directly and
then post it to the web server through the XMLHTTP object. See
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnexxml/html/xml071798.asp
for an example of how this can be done.

Another option can be the usage of the XML Data Island and XMLDSO features
(see article at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmconusingxmldatasourceobject.asp
)

Alberto

Posttop
Anonymous Subject: Re: Receiving XML through Form POST request
Author: Anonymous
Date: 07 Jan 2002 06:12 PM
In case all you want to do is get the form in XML format at the server end, and you want to have cross-browser support, then you can store the xml instance at the server, assign a unique ID to that, and store this id in the client in a hidden field. Also at the server you will have to have a generic function (there are 1000's available) which takes the field(s) and creates a new xml and returns the data. Thus cross-browser support is achieved.

Cheers/Pradeep
Lead Designer

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

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