您的位置:首页 > 其它

dtd方式文档定义

2011-11-11 10:29 232 查看
<?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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: