public String toString() {
StringBuffer buffer = new StringBuffer("< !ENTITY ");
if (name.startsWith("%")) {
buffer.append("% ");
buffer.append(name.substring(1));
} else {
buffer.append(name);
}
if (publicID != null) {
buffer.append(" PUBLIC \"");
buffer.append(publicID);
buffer.append("\" ");
if (systemID != null) {
buffer.append("\"");
buffer.append(systemID);
buffer.append("\" ");
}
} else if (systemID != null) {
buffer.append(" SYSTEM \"");
buffer.append(systemID);
buffer.append("\" ");
}
buffer.append(" >");
return buffer.toString();
}
|