这里
<root>
<SchoolOrInstitution schoolType="highschool">
<SchoolName>BUTLER HIGH SCHOOL</SchoolName>
<Degree degreeType="highschool"/>
</SchoolOrInstitution>
<SchoolOrInstitution schoolType="highschool">
<SchoolName>BUTLER HIGH SCHOOL</SchoolName>
<Degree degreeType="highschool"/>
</SchoolOrInstitution>
<SchoolOrInstitution schoolType="highschool">
<SchoolName>BUTLER HIGH SCHOOL</SchoolName>
<Degree degreeType="highschool"/>
</SchoolOrInstitution>
..............
</root>
我想根据SchoolOrInstitution
标签的数量将此 xml 拆分为多个文件。
每个 XML 应该有 3 个这样的标签。
所以如果邮件文件有 9 个SchoolOrInstitution
标签,它应该创建 3 个子文件。
并且root
标签也将分配给所有 3 个文件。