I have a Laravel template and I want to generate an XML file depending on it.
For example, the structure has a name, XPath and type. So the XML should look like this:
<name>
</name>
<type>
</type>
<xpath>
</xpath>
Of course I am looking for something more complex that can deal with relationships.
Is there any tool for that?
I am using MySQL, so maybe there is a tool for that, too? Or maybe a PHP script?
I already tried to search and all I have found is a tool to generate HTML forms from XSD and general XML from XSD.
Update
The tables and their columns are:
xml_document
table with columns:id
general_information
table with columns:id
,xml_document_id
,domain
,start_url
and `categorymaster_information
table with columns:id
,xml_document_id
,container
, andnext_page
master_attribute
table with columns:id
,master_information_id
,name
,xpath
, andtype
details_attribute
table with columns:id
,xml_document_id
, andtype
As you may notice, the relationships between:
- xml_document and master_information is one to one.
- xml_document and general_information is one to one.
- xml_document and details_attribute is one to many.
- master_information and master_attribute is one to many