I am new to XQuery 3.0 and trying to write a project.
I am sending a post request containing song[]
input element.
However, when I try to use request:get-parameter('song[]', '')
, it gives me a result as below:
Value 1 Value 2 Value 3
Anyone knows how to get these variables separately?
Edit: Actual contents of the request parameter being POSTed to eXist is provided.
HTML Form:
<form action="post.xq" method="POST">
<input name="song[]" type="text" value="Song 1" />
<input name="song[]" type="text" value="Song 2" />
<input name="song[]" type="text" value="Song 3" />
</form>
post.xq:
let $result := request:get-parameter('song[]', '')
return
<result>
{$result}
</result>
result:
<result>Song 1 Song 2 Song 3</result>