You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Pavel Krupets <pa...@sit93.com> on 2005/02/27 02:18:54 UTC
Can I use XInclude in my documents when I parse them using Xerces.DOM3
Hello,
I have some documents one of them is the root document and it contains
XInclude elements. I need to parse this document to get node elements
(which can be in the sub documents) and I use them to pass into
Castor XML Mapping framework to fill in my JavaBeans objects.
Is this possible with Xerces.DOM3?
This code parses document but completely ignores XInclude elements. Do I
need
to check XInclude elements manually?
----------------------------------------------------------------------------
-
System.setProperty(DOMImplementationRegistry.PROPERTY,
"org.apache.xerces.dom.DOMImplementationSourceImpl");
System.setProperty("org.apache.xerces.xni.parser.XMLParserConfiguration",
"org.apache.xerces.parsers.XIncludeParserConfiguration");
DOMImplementationRegistry registry =
DOMImplementationRegistry.newInstance();
_domLS = (DOMImplementationLS) registry.getDOMImplementation("XML 3.0 LS");
LSParser parser =
_domLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
Document doc = parser.parseURI("./configWithInclude.xml");
----------------------------------------------------------------------------
-
With regards,
Pavel Krupets
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org