new-line '\n' bug in my_parseXML.m
Closed this issue · 1 comments
karhohs commented
xmlread() adds a newline character to every textnode. This creates a problem when using the eval().
eval([var1 '=' var2])
where var1=name
and var2 = '''Fred\n'''
leads to
name = 'Fred '
instead of the desired name = 'Fred\n'
karhohs commented
The solution involved screening text nodes for non-whitespace characters.