dtd方式文档定义

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT department (employee)>
<!ATTLIST department id CDATA #REQUIRED>
<!ELEMENT employee (name,title,staff?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT personal (department+)>
<!ELEMENT staff (employee+)>
<!ELEMENT title (#PCDATA)>



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE personal SYSTEM "t2.dtd">
<personal>
	<department id="销售部门">
		<employee>
			<name>宋江</name>
			<title>副总经理</title>
			<staff>
				<employee>
					<name>柴进</name>
					<title>经理</title>
					<staff>
						<employee>
							<name>武松</name>
							<title>销售人员</title>
						</employee>
						<employee>
							<name>李逵</name>
							<title>销售人员</title>
						</employee>
					</staff>
				</employee>
				<employee>
					<name>公孙胜</name>
					<title>财物主管</title>
				</employee>
			</staff>
		</employee>
	</department>

	<department id="管理部门">
		<employee>
			<name>卢俊义</name>
			<title>副总经理</title>
			<staff>
				<employee>
					<name>林冲</name>
					<title>经理</title>
					<staff>
						<employee>
							<name>关胜</name>
							<title>职员</title>
						</employee>
						<employee>
							<name>扈三娘</name>
							<title>职员</title>
						</employee>
					</staff>
				</employee>
				<employee>
					<name>阮小二</name>
					<title>主管</title>
				</employee>
			</staff>
		</employee>
	</department>

	<department id="市场部门">
		<employee>
			<name>吴用</name>
			<title>副总经理</title>
			<staff>
				<employee>
					<name>时迁</name>
					<title>擢升主管</title>
				</employee>
				<employee>
					<name>戴宗</name>
					<title>广告主管</title>
				</employee>
			</staff>
		</employee>
	</department>
</personal>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值