public String quotedContent(String boldOpenTag,
                                String boldCloseTag,
                                String separatorTag,
                                boolean inAttribute) {
        StringBuilder xml = new StringBuilder();
        Iterator<FieldPart> iter = ensureTokenized().iterator();
        while(iter.hasNext()) {
            FieldPart f = iter.next();
            if (f instanceof BoldOpenFieldPart
                && boldOpenTag != null
                && boldOpenTag.length() > 0)
                xml.append(boldOpenTag);
            else if (f instanceof BoldCloseFieldPart
                     && boldCloseTag != null
                     && boldCloseTag.length() > 0)
                xml.append(boldCloseTag);
            else if (f instanceof SeparatorFieldPart
                     && separatorTag != null
                     && separatorTag.length() > 0)
                xml.append(separatorTag);
            else if (f.isFinal())
                xml.append(f.getContent());
            else
                xml.append(XML.xmlEscape(f.getContent(), inAttribute));
        }
        return xml.toString();
    }
Returns the content of this field, using the arguments as bolding tags, as an XML string
container-search/src/main/java/com/yahoo/prelude/hitfield/HitField.java