protected void closeStartElement() { add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
protected void closeStartElement() { add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
/** * Once the document is complete, * in particular once the namespace declarations have been added at the mark location, * we should try to insert a line break after those declarations. */ public void complete() { if (currentLineWidth > lineWidth) { if (" ".equals(firstString)) { addLine(); add(" "); } else if (cursorIndex + 1 < data.length) { Element element = (Element)data[cursorIndex + 1]; if (element != null && element.size > 0 && " ".equals(element.data[0])) { addLine(); add(" "); } } } }
/** * Once the document is complete, * in particular once the namespace declarations have been added at the mark location, * we should try to insert a line break after those declarations. */ public void complete() { if (currentLineWidth > lineWidth) { if (" ".equals(firstString)) { addLine(); add(" "); } else if (cursorIndex + 1 < data.length) { Element element = (Element)data[cursorIndex + 1]; if (element != null && element.size > 0 && " ".equals(element.data[0])) { addLine(); add(" "); } } } }
public void endEmptyElement() { removeLast(); add("/>"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void endEmptyElement() { removeLast(); add("/>"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void startAttribute(String name) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(name); add("=\""); }
public void startAttribute(String name) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(name); add("=\""); }
public void endContentElement(String content) { add(">"); add(content); add("</"); String name = removeLast(); add(name); add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void endContentElement(String content) { add(">"); add(content); add("</"); String name = removeLast(); add(name); add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void addAttribute(String name, String value) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(name); add("=\""); add(value); add("\""); }
public void addAttribute(String name, String value) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(name); add("=\""); add(value); add("\""); }
public void endElement() { if (lastElementIsStart) { endEmptyElement(); } else { boolean wasMixed = isMixed; String name = removeLast(); if (name != null) { if (!wasMixed) { add(getElementIndent(1)); } add("</"); add(name); add(">"); if (!isMixed) { addLine(); } } } }
public void endElement() { if (lastElementIsStart) { endEmptyElement(); } else { boolean wasMixed = isMixed; String name = removeLast(); if (name != null) { if (!wasMixed) { add(getElementIndent(1)); } add("</"); add(name); add(">"); if (!isMixed) { addLine(); } } } }
public void addAttributeNS(String prefix, String localName, String value) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(prefix); add(":"); add(localName); add("=\""); add(value); add("\""); }
public void addAttributeNS(String prefix, String localName, String value) { if (currentLineWidth > lineWidth) { addLine(); add(getAttributeIndent()); } else { add(" "); } add(prefix); add(":"); add(localName); add("=\""); add(value); add("\""); }
if (!isUnformatted && !isMixed) addLine();
if (!isUnformatted && !isMixed) addLine();