Answer: To describe the data we use XForms Model.We can also say that datamodel is an instance of XML document.We define data model into the XForms, inside a <model> element. Example: <model> <instance> <person> <fname/> <mname/> <lname/> </person> </instance> <submission id="form1" action="submit.asp" method="get"/> </model> In the above example we uses <instance> element that is use to define the XML template for data to be collected and a <submission> element is used to define how we submit a data.
The <instance> Element: Using <instance>element we can define the data that we collected. We use XForms to collect data for an XML document.And <instance> elementis use to define the XML document in XForms model. Example: <person> <fname/> <mname/> <lname/> </person> When XML data collect the data it will looks like that, <person> <fname>vivek</fname> <mname>kumar</mname> <lname>agarwal</lname> </person>
The <submission> Element: Using this element we can describe how to submit a data into an XML document. Example: <model> <instance> <person> <fname/> <mname/> <lname/> </person> </instance> <submission id="form1" action="submit.asp" method="get"/> </model> In the above example we use attribut id="form1" attribute to identify the form.And uses the action="submit.asp" attribute to define the URL to where the form should be submitted and use method="get" attribute to define the method which is use to submit the data.
To describe the data we use XForms Model.We can also say that datamodel is an instance of XML document.We define data model into the XForms, inside a <model> element. Example: <model> <instance> <person> <fname/> <mname/> <lname/> </person> </instance> <submission id="form1" action="submit.asp" method="get"/> </model> In the above example we uses <instance> element that is use to define the XML template for data to be collected and a <submission> element is used to define how we submit a data.
The <instance> Element: Using <instance>element we can define the data that we collected. We use XForms to collect data for an XML document.And <instance> elementis use to define the XML document in XForms model. Example: <person> <fname/> <mname/> <lname/> </person> When XML data collect the data it will looks like that, <person> <fname>vivek</fname> <mname>kumar</mname> <lname>agarwal</lname> </person>
The <submission> Element: Using this element we can describe how to submit a data into an XML document. Example: <model> <instance> <person> <fname/> <mname/> <lname/> </person> </instance> <submission id="form1" action="submit.asp" method="get"/> </model> In the above example we use attribut id="form1" attribute to identify the form.And uses the action="submit.asp" attribute to define the URL to where the form should be submitted and use method="get" attribute to define the method which is use to submit the data.