I'm pretty new to XForms and doing a project with XForms and eXist, so I have an XML file as a database. The problem I'm having is the following:
My XForms document looks something like this:
Expand|Select|Wrap|Line Numbers
- ...
- <xf:model version="1.0">
- <xf:instance id="data-instance" src="data.xml" xmlns="">
- <Data>
- <FirstName/>
- <LastName/>
- </Data>
- </xf:instance>
- <xf:submission id="read-from-file" method="get" action="http://localhost:8080/exist/rest/db/eXist_test/data.xml" replace="instance" instance="data-instance"/>
- <xf:submission id="save-to-file" method="put" action="http://localhost:8080/exist/rest/db/eXist_test/data.xml" replace="instance" instance="data-instance"/>
- </xf:model>
- ...
- <xf:input ref="/Data/FirstName"><xf:label>First Name: </xf:label></xf:input><br/>
- <xf:input ref="/Data/LastName"><xf:label>Last Name: </xf:label></xf:input><br/>
- <xf:submit submission="read-from-file"><xf:label>Load</xf:label></xf:submit>
- <xf:submit submission="save-to-file"><xf:label>Save</xf:label></xf:submit>
- ...
Expand|Select|Wrap|Line Numbers
- <Data>
- <FirstName>Peter</FirstName>
- <LastName>Parker</LastName>
- </Data>
My idea was therefore to cut out the src="data.xml" part in the instance description and just load the entries manually. Also, the read-from-file submission would have to be changed. However, I can't seem to be able to find anything like that online. Any ideas or suggestions, how do do this differently?
Greetings,
Nepomuk