Cay Horstmann wrote: > When converting legacy files to XHTML Strict, I frequently get this > error in XXE: > > element contains characters other than white space [cvc-complex-type.2.3] > > Annoyingly, the error highlights the enclosing (body) element that > contains hundreds of children. Finding the offending child is frustrating.
Sorry for that. XXE has been designed to make it nearly impossible creating (structurally) invalid documents. Therefore we put very few efforts into making it user-friendly when dealing with invalid documents. > I tried searching for > > following-sibling::text() > > but of course that finds hundreds of empty text nodes. > > Is there a way of locating the one non-empty text node that irks the > validator? Select the body element and then use Select|Find Element, Advanced tab. Type this XPath expression: ./text()[1][.!=''] This will select first non-empty text child of body. After that type: following-sibling::text()[1][.!=''] This will select next non-empty text child of body. After that press Ctrl-A (_A_ like _A_gain) to repeat the above command in order to select more non-empty text children of body.

