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)

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="" xmlns:ev=""   xmlns:xf=""     xmlns:xsd=""   xmlns:xsi="">    <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=""     xmlns:ev=""xmlns: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]