为什么这段代码给我错误?
<clients>
<client>
<name!> </name!>
<cif ></cif>
</client>
</clients>
为什么我不能在XML元素名称中使用!
字符?有没有反对的规则?
答案 0 :(得分:5)
W3C XML BNF for XML names不允许 为感叹号( double[] array1 = {2, 4, 6}
double[] array2 = {2, 2, 0}
public static double[] divide(double[] operand1, double[] operand2) {
double[] divArray = new double[operand1.length];
for(int i = 0; i < operand1.length; i++) {
if (operand2[i] == 0) {
divArray[i] = Double.NaN;
} else {
divArray[i] = operand1[i] / operand2[i];
}
}
return divArray;
}
:
!