The only valid whitespace chars inside a tag are space, tab, newline, carriage return, vertical tab, and formfeed (not 100% sure of this but it is close). Simply set up a constant QString with the real whitespace chars according to the spec and use QString::contains to check for exactly the spec whitespace quite easily anyplace. There are many other "whitespace" chars that should never appear inside a tag and if they do they are part of an attribute value or something.
Hope this helps.
KevinH
Last edited by KevinH; 07-21-2016 at 06:22 PM.
|