Last active
December 12, 2015 00:38
-
-
Save antoinerg/4684891 to your computer and use it in GitHub Desktop.
Matlab function to parse XInclude in XML files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function xdoc = xmlread_xinclude(filename) | |
% Parse XML expanding XInclude tags | |
parserFactory = javaMethod('newInstance',... | |
'javax.xml.parsers.DocumentBuilderFactory'); | |
javaMethod('setXIncludeAware',parserFactory,true); | |
javaMethod('setNamespaceAware',parserFactory,true); | |
p = javaMethod('newDocumentBuilder',parserFactory); | |
xdoc=xmlread(filename,p); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment