[英]How do I get the list of jar files to be included in classpath for Okta java-api calls?
[英]Java and XML: How to get list of included files
我对 Xinclude 或作为实体包含文件有疑问。 我需要知道,解析器包含了哪些文件。 例子:
<?xml version="1.0" ?> <!DOCTYPE docBookChapter [ <!ENTITY externalFile SYSTEM "entityIncluded.xml"> ]> <chapter xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Third chapter</title> <xi:include href="xIncluded.xml"/> <chapter> &externalFile;</chapter> </chapter>解析器成功创建 DOM,但如何获取包含的文件名? 元素
xi:include
已经替换为文件的内容。
扩展DefaultHandler
和@Overwrite
resolveEntity
方法。 您的实现将简单地打印或记录 publicId/systemId 并返回null
,因此SAXParser
将使用默认行为来解析实体。
使用SAXParser
构造函数传递DefaultHandler
子类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.