Use XML to PHP
Converts XML through the existing XML-to-JSON mapping, then reuses the model generators. Start with the sample, select the options and run the tool. Copy or download the result after reviewing it.
Behavior and limits
Converts XML through the existing XML-to-JSON mapping, then reuses the model generators. Attributes use @ prefixes, text uses #text, and repeated child elements become arrays. XML scalar values stay strings; namespaces and schema types are not inferred. External declarations are rejected. Review the mapping before using the models.
Example input
<user id="1"><name>Ada</name><enabled>true</enabled><tags><tag>developer</tag><tag>admin</tag></tags></user>
Expected behavior for the example
Generates a Root model containing a user. The user has an @id attribute, name and enabled strings, plus a tags object with repeated tag strings.
Check important output in the application that will consume it. Use the tool directory to find related formats and tasks.
Frequently asked questions
How does XML to PHP handle my input?
Converts XML through the existing XML-to-JSON mapping, then reuses the model generators. Attributes use @ prefixes, text uses #text, and repeated child elements become arrays. XML scalar values stay strings; namespaces and schema types are not inferred. External declarations are rejected. Review the mapping before using the models.
Is my input uploaded or saved automatically?
Processing runs locally in this browser. Input and results are not saved automatically. Downloads happen only when you choose them. The static preview blocks scripts and external resources when one is available.