Skip to content

Conversation

jas8522
Copy link

@jas8522 jas8522 commented Dec 16, 2017

Associative arrays convert directly to XML. However, there's no directly convertable array representation that supports duplicate keys, whereas the Plesk XML API requires it.
Therefore indexed arrays should create duplicating 'key' XML elements. Example:
<greeting> <hi>hola</hi> <hi>hello</hi> <hi>bonjour</hi> </greeting>

Can be represented in array form as:
array('greeting' => array('hi' => array('hola', 'hello', 'bonjour')));

Currently, as far as I can tell, you simply can't pass an array into this library that uses data in this manner, yet <filter> requests often require it.

Associative arrays convert directly to XML. However, there's no directly convertable array representation that supports duplicate keys, whereas the Plesk XML API requires it. 
Therefore indexed arrays should create duplicating 'key' XML elements. Example:
<greeting>
    <hi>hola</hi>
    <hi>hello</hi>
    <hi>bonjour</hi>
</greeting>

Can be represented in array form as:
array('greeting' => array('hi' => array('hola', 'hello', 'bonjour')));

Currently, as far as I can tell, you simply can't pass an array into this library that uses data in this manner, yet <filter> requests often require it.
@xgin
Copy link
Member

xgin commented Dec 20, 2017

Thanks for your efforts!
We reworked your changes in order to support nested structures in the array.
It was merged in #37

@xgin xgin closed this Dec 20, 2017
mrsombre pushed a commit that referenced this pull request Aug 2, 2019
…utotests-PPP-30481 to master

* commit 'afc0110e141a4bc785c6ee3601e64719041639b9':
  BUGFIX PPP-30481 Added data attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants