// System.out.println("AddText "+domArgument.length());
if (domArgument.length() >= 1)
{
if (!script && !style)
{
Text textNode = resultDocument.createTextNode(domArgument);
currentElement.appendChild(textNode);
}
else
{
domArgument = domArgument.trim();
String cdata = getCDATASection(domArgument);
if (cdata != null)
{
if (script)
cdata = DomDocumentBuilder.fixText(cdata);
else
cdata = DomDocumentBuilder.fixText(domArgument);
CDATASection cdataSection = resultDocument.createCDATASection(cdata);
currentElement.appendChild(cdataSection);
}
else
{
domArgument = DomDocumentBuilder.fixText(domArgument);
Text textNode = resultDocument.createTextNode(domArgument);
currentElement.appendChild(textNode);
}
}
}
break;