[英]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.