for (Node child = target.getFirstChild(); child != null; child = child.getNextSibling()) {
switch (child.getNodeType()) {
case Node.TEXT_NODE :
{
IDOMNode text = (IDOMNode) child;
int charOffset = validateTextSource(text);
if (charOffset >= 0) {
charOffset += text.getStartOffset();
Segment errorSeg = new Segment(charOffset, 1);
if (errorSeg != null)
report(INVALID_CHAR_ERROR, errorSeg, text);
}
break;
}
case Node.COMMENT_NODE :
case Node.DOCUMENT_TYPE_NODE :
case Node.PROCESSING_INSTRUCTION_NODE :
case Node.CDATA_SECTION_NODE :
{
IDOMNode tag = (IDOMNode) child;
if (!tag.isClosed()) {
Segment errorSeg = FMUtil.getSegment(tag, FMUtil.SEG_WHOLE_TAG);
if (errorSeg != null)
report(UNCLOSED_TAG_ERROR, errorSeg, tag);
}
break;