Re: xml posting (Asit)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: xml posting (Asit)

raja38
Hi Asit!!!!
 1.     That's very simple you copy and paste the following code and save as some name .xhtml then open it in your xforms enabled firefox browser then see the result  then enter some text in that text box then click the submit button your output xml will be generated
code :

<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events"   xmlns:xf="http://www.w3.org/2002/xforms"     xmlns:xsd="http://www.w3.org/2001/XMLSchema"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <head>        <title>Simple Submission</title>                <xf:model>        <xf:instance id="first"><Test xmlns=""><Myname/></Test></xf:instance>                    <xf:submission id="test" action="myname.xml" method="put"/>                    </xf:model>    </head>    <body>    <center><xf:label>Enter Your Name And Click the Submit Button</xf:label></center><br/>    <xf:input ref="/Test/Myname"><xf:label>Enter Your Name</xf:label></xf:input><br/>    <xf:output ref="/Test/Myname"><xf:label>Hi:</xf:label></xf:output><br/>    <xf:submit submission="test"><xf:label>Submit </xf:label></xf:submit>    </body></html>

2. I have example but its also not working. I don’t know why  xml
isn’t saving data.
 Pls check the following code in your browser .. It's now working and generating xml file ..

code :

<?xml version="1.0" encoding="ASCII"?><html xmlns="http://www.w3.org/1999/xhtml"     xmlns:ev="http://www.w3.org/2001/xml-events"xmlns:xforms="http://www.w3.org/2002/xforms">  <head>     <title>XForms Submit Example</title>     <xforms:model>         <xforms:instance id="my-instance">          <MyData xmlns="">               <Data1>One</Data1>               <Data2>Two</Data2>              <Data3>Three</Data3>           </MyData>         </xforms:instance>   <xforms:submission id="save-instance-to-client" method="put" action="my-data.xml" ref="instance('my-instance')" />   </xforms:model>   </head> <body>    <xforms:submit submission="save-instance-to-client">       <xforms:label>Save</xforms:label>      </xforms:submit>  </body> </html>

Thanks and regards

Rajamani Marimuthu
Junior Research Fellow-JRF
NIC -Open Technology Centre
Rajaji Bhavan
Besant Nagar,
Chennai - 90
Cell : 9791125383




_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms