Skip to content

Import XML File (PHP) — Reference

Reference · Advanced · Server Connect

Read repeated child elements from an XML file using the PHP implementation.

Read repeated child elements from an XML file using the PHP implementation.

  • A PHP Server Connect action and a trusted XML test file. Node.js XML import is not implemented in the installed runtime.

Read repeated child elements from an XML file using the PHP implementation.

Setting Meaning
NameNames the imported collection.
PathThe application-relative server XML filename.
Import FieldsChild field names that must exist on each imported item. This is a required-field check, not a configurable XPath or a full schema validator.
OutputIncludes the imported result in the action response when enabled. Default off.

On PHP, import a test document <products><product><id>1</id><name>Notebook</name></product></products>. Require id and name and inspect the returned item. Remove name from a copy and confirm the validation failure.

The installed Node.js import.xml function throws “not implemented”. Do not use this reference as a working Node.js XML-import procedure. PHP selects children under the root with //; it is not a general configurable nested-data importer. Validate the file source and expected structure, and use a supported parser/custom action when that contract is insufficient.

Keep file parsing, data validation, database writes and file downloads explicit. A successful import/export step alone does not perform the rest of that workflow.

You can prepare the required file/data shape, configure the operation and inspect its returned file or records.