How can i create a xml document based on a schema using php? -


i want create xml file data given users.

i can use simplexml or domdocument creating xml files , there option in domdocument verify xml document schema .

but need instead of creating nodes , adding values using xml classes, can create xml file data stored somewhere else in respect schema?

i think in .net there option write xml reading dataset.. couldn't find such thing in php.

is possible , there classes that?

if there no predefined classes , @ least on ways of doing that?

edit:

i'm editing question because seems of not clear requirement..

for example, if schema

<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 data pan, name, fathername, address, dob need create xml document automatically matching schema , data.

the schema may change time time , dont want edit code create/ change nodes , attributes. need point new schema , code creates xml based on that.

have @ https://github.com/moyarada/xsd-to-php compiles php bindings xsd, , can serialize php classes xml.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -