Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
希望将数组作为参数通过xml传递到java文件_Java_Arrays_Xml_Selenium Webdriver - Fatal编程技术网

希望将数组作为参数通过xml传递到java文件

希望将数组作为参数通过xml传递到java文件,java,arrays,xml,selenium-webdriver,Java,Arrays,Xml,Selenium Webdriver,我想知道如何在XML中将数组作为参数传递,然后在Java文件中使用它 例如 //这里我想传递'Asia'和'Africa'作为参数。 把亚洲和非洲的价值放在一起是不正确的。请帮忙 为什么不能使用参数名作为标记名,并将值定义为它的子标记 <assetTypes> <assertType></assertType> </assetTypes> <instrumentTypes> <instrumentType>&l

我想知道如何在XML中将数组作为参数传递,然后在Java文件中使用它

例如

//这里我想传递'Asia'和'Africa'作为参数。

把亚洲和非洲的价值放在一起是不正确的。请帮忙

为什么不能使用参数名作为标记名,并将值定义为它的子标记

<assetTypes>
  <assertType></assertType>
</assetTypes>
<instrumentTypes> 
   <instrumentType></instrumentType>
<regions>  
  <region value="Asia"/> 
  <region value="Africa"/>
</regions>


您尝试过xml解析器吗?您可以在单个参数中传递多个值,并在代码中使用逗号将其拆分,然后将其保存到数组中。@siddarthgreeni Not triedher此处不允许。。这个错误正在出现
<assetTypes>
  <assertType></assertType>
</assetTypes>
<instrumentTypes> 
   <instrumentType></instrumentType>
<regions>  
  <region value="Asia"/> 
  <region value="Africa"/>
</regions>