0

What I want to do is basically have my XML look like this:

<root>
  <Map1>  </Map1>
  <Map2>  </Map2> 
  <Map3>  </Map3>
</root>

I don't want to have to declare a new variable every time I want a new map, so how would I create an index at the end of my variable?

4

1 回答 1

1

您可以添加一个索引属性,因此您的 xml 变为:

<root>
  <Map index="1" />
  <Map index="2" />
  <Map index="3" />
</root>
于 2013-05-25T21:34:08.793 回答