문제

While validating an XML document using Xerces, it tries to access internet resources in w3c.org. My application that needs to work offline/behind a firewall throws an exception because of that.

Is there a workaround?

ps. This link provides some insights but no workarounds: http://xerces.apache.org/xerces2-j/faq-general.html#faq-10

도움이 되었습니까?

해결책

The workaround is to supply a "catalog resolver" which redirects these requests to local copies.

A convenient way of doing this, for some applications, is to do the parsing via Saxon, which contains local copies of the most commonly used resources and does the redirection by default, without any user intervention. But whether this is convenient for you depends on the nature of the application.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top