从JSON文件制作表

时间:2017-12-13 13:12:37

标签: html angularjs json xml xmltable

我的XML文件结构如

<theme1>
  <id>
  <name>
  <students>
    <stu1>
      <max>
      <count>
    </stu1>
    <stu2>
      <max>
      <count>
    </stu2>
  </students>
<theme1>
<theme2>
  <id>
  <name>
  <students>
    <stu1>
      <max>
      <count>
    </stu1>
    <stu2>
      <max>
      <count>
    </stu2>
  </students>
<theme2>

我可以使用angularjs以某种方式创建这样的表: https://jsfiddle.net/xc8bufns/

以下是样本:

  

[{&#34; THEMENAME&#34;:&#34; THEME1&#34;&#34; TestId&#34;:52,&#34;可见&#34;:真,&#34;学生& #34;:[{&#34;为test_id&#34;:52,&#34; FIO&#34;:&#34;名1&#34;&#34; MAX&#34:4, &#34; C ^'mount&#34:4},{&#34;为test_id&#34;:52,&#34; FIO&#34;:&#34;名称2&#34;&#34;毫安X&#34;:5,&#34;计数&#34;:1},]},{&#34; THEMENAME&#34;:&#34; THEME2&#34;&#34 ; TestId&#34; 85&#34; visibl E&#34;:真,&#34;学生&#34;:[{&#34;为test_id&#34;:0,&#34; FIO& #34;:&#34;名1&#34;&#34; MAX&#34;:0,&#34; COUN T&#34;:0},{&#34;为test_id&#34 ;: 0,&#34; FIO&#34;:&#34; Name2&#34;,&#34; max&#34;:0,&#34; count&#34;:0}]}}] < / p>

0 个答案:

没有答案