I wrote an XML + Tree infinite Tree js version.

Source: Internet
Author: User

<Head> <style type = "text/css">. select {width: 80%; border: 0px solid # bfbfbf ;}. options {width: 98%; border: 0px solid # ff0000 ;}. tree {width: 92%; border: 0px solid # ff0000 ;}</style> </pead> <body> <xml id = "Login"> <? Xml version = "1.0" encoding = "UTF-8"?> <Students name = "98 class"> <Student name = "Wang Xiaoping"> <Chinese id = "文"> <Item id =" single answer "> <Score id =" 33 "> </Score> <Score id =" 33 "> </Score> <Score id =" 33 "> </Score> </Item> <Item id =" multiple choice questions "> <Score id =" 33 "> </Score> </Item> <Item id =" calculation question "> <Score id =" 33 "> </Score> </ item> <Item id = "application question"> <Score id = "33"> </Score> </Item> <Item id = "additional question"> <Score id =" 33 "> </Score> </Item> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Wang Xiaobo"> <Chinese id = "Xiaowen"> <Item id = "single answer"> <Score id = "33"> </Score> <Score id = "33"> </Score> <Score id = "33"> </Score> </Item> <Item id = "multiple choice questions"> <Score id = "33"> </Score> </Item> <Item id = "calculation question"> <Score id = "33"> </Score> </Item> <Item id = "application question"> <Score id = "33"> </ score> </Item> <Item id = "additional question"> <Score id = "33"> </Score> </Item> </Chinese> <Physics id =" physics </Physics> <English id = ""> </English> <Geography id = "Geography"> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "zhuyun"> <Chinese id = "zhuwen"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Meng zhijiang"> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </ student> <Student name = ""> <Chinese id = "文"> </Chinese> <Physics id =" physical "> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = ""> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id =" ""> </English> <Geography id =" "> </Geography> <Historical id =" "> </Historical> </Student> <Student name =" yi bihong "> <Chinese id =" 文"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = "Geography"> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Jiang Haiping"> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "yao miao"> <Chinese id = "文""> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id =" geography "> </Geography> <Historical id =" "> </Historical> </Student> <Student name =" "> <Chinese id =" 文 "> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <Geography id =" "> </Geography> <Historical id = ""> </Historical> </Student> <Student name = ""> <Chinese id =" 文>"> </ chinese> <Physics id = ""> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <pistorical id = ""> </Historical> </Student> <Student name = "Hu Guang"> <Chinese id = "文"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id =" shi "> </Historical> </Student> </Students> </xml> <body>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
<Head> <style type = "text/css">. select {width: 80%; border: 0px solid # bfbfbf ;}. options {width: 98%; border: 0px solid # ff0000 ;}. tree {border: 0x solid # ff0000 ;}. treeView {height: 400px; width: 300px; border: 1x solid # ff0000; overflow: auto ;} </style> </pead> <body> <xml id = "Login"> <? Xml version = "1.0" encoding = "UTF-8"?> <Students name = "98 class"> <Student name = "Wang Xiaoping"> <Chinese id = "文"> <Item id =" single answer "> <Score id =" 33 "> </Score> <Score id =" 33 "> </Score> <Score id =" 33 "> </Score> </Item> <Item id =" multiple choice questions "> <Score id =" 33 "> </Score> </Item> <Item id =" calculation question "> <Score id =" 33 "> </Score> </ item> <Item id = "application question"> <Score id = "33"> </Score> </Item> <Item id = "additional question"> <Score id =" 33 "> </Score> </Item> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Wang Xiaobo"> <Chinese id = "Xiaowen"> <Item id = "single answer"> <Score id = "33"> </Score> <Score id = "33"> </Score> <Score id = "33"> </Score> </Item> <Item id = "multiple choice questions"> <Score id = "33"> </Score> </Item> <Item id = "calculation question"> <Score id = "33"> </Score> </Item> <Item id = "application question"> <Score id = "33"> </ score> </Item> <Item id = "additional question"> <Score id = "33"> </Score> </Item> </Chinese> <Physics id =" physics </Physics> <English id = ""> </English> <Geography id = "Geography"> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "zhuyun"> <Chinese id = "zhuwen"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Meng zhijiang"> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </ student> <Student name = ""> <Chinese id = "文"> </Chinese> <Physics id =" physical "> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = ""> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id =" ""> </English> <Geography id =" "> </Geography> <Historical id =" "> </Historical> </Student> <Student name =" yi bihong "> <Chinese id =" 文"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = "Geography"> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "Jiang Haiping"> <Chinese id =" 文"> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <geography id = ""> </Geography> <Historical id = ""> </Historical> </Student> <Student name = "yao miao"> <Chinese id = "文""> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id =" geography "> </Geography> <Historical id =" "> </Historical> </Student> <Student name =" "> <Chinese id =" 文 "> </Chinese> <Physics id =" physical "> </Physics> <English id =" "> </English> <Geography id =" "> </Geography> <Historical id = ""> </Historical> </Student> <Student name = ""> <Chinese id =" 文>"> </ chinese> <Physics id = ""> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <pistorical id = ""> </Historical> </Student> <Student name = "Hu Guang"> <Chinese id = "文"> </Chinese> <Physics id = "physical"> </Physics> <English id = ""> </English> <Geography id = ""> </Geography> <Historical id =" shi "> </Historical> </Student> </Students> </xml> <body>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.