Import XML File (PHP) — Reference
Read repeated child elements from an XML file using the PHP implementation.
Read repeated child elements from an XML file using the PHP implementation.
Before you begin
Section titled “Before you begin”- A PHP Server Connect action and a trusted XML test file. Node.js XML import is not implemented in the installed runtime.
Import XML File (PHP)
Section titled “Import XML File (PHP)”Read repeated child elements from an XML file using the PHP implementation.
Settings
Section titled “Settings”| Setting | Meaning |
|---|---|
| Name | Names the imported collection. |
| Path | The application-relative server XML filename. |
| Import Fields | Child field names that must exist on each imported item. This is a required-field check, not a configurable XPath or a full schema validator. |
| Output | Includes the imported result in the action response when enabled. Default off. |
Worked example
Section titled “Worked example”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.
Format and runtime limits
Section titled “Format and runtime limits”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.
Validate before the next operation
Section titled “Validate before the next operation”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.
Check your result
Section titled “Check your result”You can prepare the required file/data shape, configure the operation and inspect its returned file or records.