我需要读取所有 dtd 元素并加载到 java 列表或其他内容中。我不想验证元素。我要寻找的只是读取 dtd 中的所有元素。
例如 :
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT TSListing ((TSReference | (TSIdentification, TSFile?)), TSPriorityApplicationIdentification?, (TSName)>
<!ATTLIST TSListing
dtdVersion CDATA #REQUIRED
fileName CDATA #IMPLIED
softwareName CDATA #IMPLIED
softwareVersion CDATA #IMPLIED
productionDate CDATA #IMPLIED
originalFreeTextLanguageCode CDATA #IMPLIED
nonEnglishFreeTextLanguageCode CDATA #IMPLIED
>
<!ELEMENT TSReference (#PCDATA)>
<!ELEMENT TSIdentification (IPOfficeCode, ApplicationNumberText, FilingDate?)>
<!ELEMENT TSApplicationIdentification (IPOfficeCode, ApplicationNumberText, FilingDate?)>
<!ELEMENT TStName (#PCDATA)>
我想把它加载到一些列表或地图中?