Hi
I have a situation where i need to create a xml document from the data given by the users.
In this part i’ve no problems. I tried both simplexml and DOMDocument for that.
And also i’ve a scheme for the xml document.
Now I need to create the xml document with respect to the schema.
For example, if the schema is
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified">
<xs:element name="formpatterns">
<xs:element name="pan" type="pantype"/>
<xs:element name="name" type="nametype"/>
<xs:element name="fatherName" type="nametype"/>
<xs:group ref="address"/>
<xs:element name="dob" type="xs:date"/>
</xs:schema>
and if user gives the data for pan, name, fathername, address, dob then
i need to create the xml document automatically by matching the schema and data.
Any help??