private static String escapeTagValue(String tag_value){
  return tag_value.replace("\"","\\\"");
}

private static String escapeTagValue ( String tag_value ) { return tag_value . replace ( "\"" , "\\\"" ) ; }
does the escaping of tag values . this function assumes you ' ll put double quotes ( ' " ' ) around your tag value .
