public static void xmlOpen(IBuffer result, String indent, String tag, Properties attributes) { xmlOpen(result, indent, tag, attributes, false /* no newline */); }
public static void xmlOpen(IBuffer result, String indent, String tag, Properties attributes) { xmlOpen(result, indent, tag, attributes, false /* no newline */); }
/** * Push a new tag. Its value is stored and will be compared against the parameter * passed to pop(). * * @param tagName The name of the tag. * @param schema The schema to use (can be null or an empty string). * @param attributes A Properties file representing the attributes (or null) */ public void push(String tagName, @Nullable String schema, @Nullable Properties attributes) { XMLUtils.xmlOpen(m_buffer, m_currentIndent, tagName + schema, attributes); m_tagStack.push(new Tag(m_currentIndent, tagName, attributes)); m_currentIndent += DEFAULT_INDENT_INCREMENT; }
/** * Push a new tag. Its value is stored and will be compared against the parameter passed to pop(). * * @param tagName The name of the tag. * @param schema The schema to use (can be null or an empty string). * @param attributes A Properties file representing the attributes (or null) */ public void push(String tagName, @Nullable String schema, @Nullable Properties attributes) { XMLUtils.xmlOpen(m_buffer, m_currentIndent, tagName + schema, attributes); m_tagStack.push(new Tag(m_currentIndent, tagName, attributes)); m_currentIndent += DEFAULT_INDENT_INCREMENT; }
/** * Generate tag. * An opening and closing tag will be generated even if value is null. * @param name name of the tag * @param content content for this tag (or null) * @param attributes tag attributes (or null) */ static public String xml(String indent, String name, @Nullable String content, @Nullable Properties attributes) { IBuffer result = Buffer.create(); xmlOpen(result, indent, name, attributes, true /* no newline */); if (content != null) { result.append(content); } xmlClose(result, "", name, XMLUtils.extractComment(name, attributes)); return result.toString(); }
/** * Generate tag. An opening and closing tag will be generated even if value is null. * * @param name name of the tag * @param content content for this tag (or null) * @param attributes tag attributes (or null) */ public static String xml( String indent, String name, @Nullable String content, @Nullable Properties attributes) { IBuffer result = Buffer.create(); xmlOpen(result, indent, name, attributes, true /* no newline */); if (content != null) { result.append(content); } xmlClose(result, "", name, XMLUtils.extractComment(name, attributes)); return result.toString(); }