Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.*; import org.w3c.dom.*; public class Main { /** * Method for handling serialization of String objects. * @author Tristan Bepler */ private static boolean writeSpecialCaseObjectIsString(Object o, Element cur, Document doc, List<Object> written) { if (o instanceof String) { cur.setTextContent((String) o); return true; } return false; } }