xmltool is provided with a explanation pdf file produced with ocamaweb.
this new version allow to request only a given type of tags.
see up-to-date version on sourceforge :
Charles Lehalle (2020). XML parsing tools (https://www.mathworks.com/matlabcentral/fileexchange/3074-xml-parsing-tools), MATLAB Central File Exchange. Retrieved .
Hi. I'm trying to use xml_parse on a 114299 long string. Shorter strings goes well. No error messages or anything?
Hi. I' trying to use xml_parse on a string which is 114299 long, but get only an empty struck back. Have tried it on shorter strings from same device and no problems?? Any sugestions??
No error messages or anything
This tool worked EXCELLENT after putting in a few modifications. I am exporting / inporting XMLs from an adobe acrobat file so formatting was important. The main things causing problems were the calls to upper() and newline / margin management.
Heres my workarounds (added removal of newlines from pdfs exported xml (this code needs solid containers e.g. <c>something</c>)
%< Récupération du fichier dans un string
fid = fopen(arg, 'r');
F = fread(fid);
%Loop through. Find the sequence \n> and remove newline.
i = 1;
numChars = length(F);
while i < numChars
if F(i) == 10 %char(10) is \n
if F(i+1) == 62 %char(62) is >
F(i:end-1) = F(i+1:end); %Shift left
numChars = numChars-1;
i = i+1;
%Truncate the extra bits on the end
F = F(1:numChars);
s = char(F');
And then I removed all calls to upper (except on strcmps / case switches) and set
margin = '';
I am trying to use your function but I got this message. Is there any way to fix this or should I divide the file in smaller parts?
??? Maximum recursion limit of 500 reached. Use
to change the limit. Be aware that exceeding your available stack
crash MATLAB and/or your computer.
Error in ==> num2cell
Good tool, but runs slow for large files, and does not handle xml comments as is, but wasn't too hard to figure out how to fix that. I actually think the syntax
works better than other matlab xml tools on the file exchange, as the structure will always be the same format no matter what the xml file. This also handles repetative tag names, which the others that I've seen do not. You can make it more readable by using intermediate variables suchas:
mysubsystem = z.child(1)
mysub_subsystem = mysubsystem.child(1)
Good tool, but it doesn't handle CDATA elements (which should not be parsed, but should be kept within the parsed structure as text).
A very good tool.
After interesting exchanges with the author, it turns out that the syntax "z.child(2).child(1).child(3).child.attribs(2)", which is not very nice, cannot be more specific to the file (as z.root.thirdbranch.otherbranch.myleaf) because the tree described by an xml file can have branches with the same name and different structures. According to Charles Lehalle, future developments of the tool should include friendlier ways to access to the data. This is a good reason to subscribe to the automatic notification of changes of the file.
an up-to-date version of this file will be downloadable at https://sourceforge.net/project/showfiles.php?group_id=72934
you can submit bugs or features requets there too.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!