Publish generates an error in m2mxdom

2 次查看(过去 30 天)
Publish comes up with a strange response. I've looked for answers, and the bug is reported to have been squashed in 2011b, but I have 2012b and it is still alive and kicking. I have the following code snippet (defining 'publish_test' as publish_test.m before running publish):
>> type publish_test
function publish_test
%%publish test
end
>> publish('publish_test')
No method 'createTextNode' with matching signature found for class
'org.apache.xerces.dom.DocumentImpl'.
Error in m2mxdom>createDom (line 53)
newTextNode = dom.createTextNode(matlabVersion.Version);
Error in m2mxdom (line 32)
dom = createDom;
Error in publish (line 143)
[dom,cellBoundaries] = m2mxdom(code);
I get the following output:
No method 'createTextNode' with matching signature found for class
'org.apache.xerces.dom.DocumentImpl'.
Error in m2mxdom>createDom (line 53)
newTextNode = dom.createTextNode(matlabVersion.Version);
Error in m2mxdom (line 32)
dom = createDom;
Error in publish (line 143)
[dom,cellBoundaries] = m2mxdom(code);
Any thoughts or a different bug report?
Thanks.
Doug

回答(1 个)

Aniket
Aniket 2025-6-11
This issue happens if you have a third party toolbox installed in a directory named "matlab". You can check that by running below command in the MATLAB command window
v = ver('matlab')
If this returns structure array, rename the directory for the other "matlab" and update your matlabpath accordingly by running below command:
restoredefaultpath;
rehash toolboxcache;
savepath
This should resolve the issue!

类别

Help CenterFile Exchange 中查找有关 MATLAB Report Generator 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by