Node child = node.getFirstChild();
if( (child.getNodeType() == Node.ELEMENT_NODE)
&&
child.hasAttributes()
){
Node cls = child.getAttributes().getNamedItem("class");
if (cls != null) {
String clsName = cls.getNodeValue();
if ( clsName.equals("begin-script")
||
clsName.equals("mid-script")
) {
child = child.getFirstChild();
String s = child.getNodeValue();
((org.w3c.dom.Text) child).setData( prefix + s );
} } }
-_-_-