Invalid Character Error #179
Replies: 3 comments
-
Can you please share sample array here. I have one solution for this issue. The same problem happened to me because of isArrayAllKeySequential method. It's happen because of mixed keys data types in an array. i.e combination of int & string. So keep one value and manually add the element attribute or new element using xpath.
|
Beta Was this translation helpful? Give feedback.
-
I have same error with example from docs $array = [
'__custom:ns\\:custom-key:1' => [
'name' => 'Vladimir',
'nickname' => 'greeflas',
],
'__custom:ns\\:custom-key:2' => [
'name' => 'Marina',
'nickname' => 'estacet',
'tags' => [
'__custom:ns\\:tag:1' => 'first-tag',
'__custom:ns\\:tag:2' => 'second-tag',
]
],
];
$result = ArrayToXml::convert($array); I whant to use xml prefix like this
but I can't |
Beta Was this translation helpful? Give feedback.
-
FYI: We had the same issue which was caused by an empty array key: $aData = explode('=', '=braun'); As the array key is used as XML node the node was invaild as it was empty. |
Beta Was this translation helpful? Give feedback.
-
DOMException
Invalid Character Error
at vendor/spatie/array-to-xml/src/ArrayToXml.php:193
Beta Was this translation helpful? Give feedback.
All reactions