dakkardaemor
Programmer
1st question:
I've a HTML form, I must create an XML fragment from it and add this piece of XML to an existing XML file, that I use as a simple database.
For example:
I've a HTML form, I must create an XML fragment from it and add this piece of XML to an existing XML file, that I use as a simple database.
For example:
Code:
<database>
<record id="0">
<name>john</name>
<phone>234</phone>
</record>
<record id="1">
<name>Henry</name>
<phone>564</phone>
</record>
</database>
[/code>
So with my HTML form I fill name and phone and I must add the new record to my XML file. I can use "specific" code, but must be general (for many types of simple XML databases.
2nd question
How can I validate the added record with a given XML schema?
The schema can validate a single record, and not the entire XML database.