List<XmlElement> (XmlTagChild[] elements) { final List<XmlElement> list = new SmartList<>(); for (XmlTagChild child : elements) { if (child instanceof XmlText) { for (PsiElement element : child.getChildren()) { if (element instanceof PsiWhiteSpace) continue; if (addSpecialXmlTags(element, list)) continue; if (XmlUtil.isXmlToken(element, XmlTokenType.XML_DATA_CHARACTERS)) list.add((XmlToken)element); else if (element instanceof XmlComment) list.add((XmlComment)element); } } else { list.add(child); } } return list; }