How do I substitute an xsd when using dom4j?
Posted
by HappyEngineer
on Stack Overflow
See other posts from Stack Overflow
or by HappyEngineer
Published on 2010-03-29T23:17:39Z
Indexed on
2010/03/29
23:23 UTC
Read the original article
Hit count: 407
I'm using dom4j to load an xml file which references an xsd. If the xml file references the xsd http://foo/bar.xsd, how can I tell dom4j to instead use an xsd file located in the classpath? I was hoping that I could open an inputstream to the local xsd and then pass that to dom4j to use when it encounters that url.
The next best thing would be to just have dom4j use an alternate url that could point to a local file like file:///c:/foo/bar.xsd.
© Stack Overflow or respective owner