在DTD文档中使用参数实体来替换所有的#PCDATA和CDATA。

时间:2025-04-03 14:14:20
<?xml version="1.0" encoding="UTF-8"?> <spyBase> <spy spyID="A001"> <firstName>Nikki</firstName> <lastName>Devgood</lastName> <AliasTab> <alias aID="1">Spy Grrrl</alias> <alias aID="2">La Femme Nikki</alias> </AliasTab> <MissionTab> <mis mID="M101"> <date>2005/4/15</date> <description>Crack the code</description> <status>Mission Accomplished</status> </mis> <mis mID="M102"> <date>2006/2/15</date> <description>Get the source</description> <status>Mission Accomplished</status> </mis> <mis mID="M103"> <date>2006/5/4</date> <description>Hit the target</description> <status>In Progress</status> </mis> </MissionTab> </spy> <spy spyID="A006"> <firstName>Link</firstName> <lastName>Lister</lastName> <AliasTab> <alias aID="3">LL</alias> <alias aID="4">Fred</alias> </AliasTab> <MissionTab> <mis mID="M104"> <date>2006/6/15</date> <description>Shoot the rapid</description> <status>In Progress</status> </mis> </MissionTab> </spy> <spy spyID="A003"> <firstName>Danger</firstName> <lastName>Mause</lastName> <AliasTab> <alias aID="5">Big Ears</alias> </AliasTab> <MissionTab> <mis mID="M105"> <date>2005/11/4</date> <description>Get the &lt;bigcheese&gt;</description> <status>In Progress</status> </mis> <mis mID="M106"> <date>2006/4/4</date> <description>Map the area</description> <status>In Progress</status> </mis> </MissionTab> </spy> <spy spyID="A099"> <firstName>Barbara</firstName> <lastName>Feldon</lastName> <MissionTab> <mis mID="M107"> <date>2006/5/2</date> <description>Get Smart</description> <status>In Progress</status> </mis> </MissionTab> </spy> <spy spyID="A004"> <firstName>Maxwell</firstName> <lastName>Smart</lastName> <AliasTab> <alias aID="6">Inspector Gadget</alias> <alias aID="7">Don Adams</alias> </AliasTab> <MissionTab> <mis mID="M108"> <date>1967/2/15</date> <description>Protect Chief</description> <status>In Progress</status> </mis> <mis mID="M109"> <date>2006/6/15</date> <description>Get some style</description> <status>Mission Accomplished</status> </mis> </MissionTab> </spy> </spyBase>