protected void closeStartElement() { add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void addAttributeContent(String content) { add(content); }
protected void closeStartElement() { add(">"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void endAttribute() { add("\""); }
public void endAttribute() { add("\""); }
public void addAttributeContent(String content) { add(content); }
public void addCDATA(String newString) { if (lastElementIsStart) { closeStartElement(); } add("<![CDATA["); if (lineWidth != Integer.MAX_VALUE) { currentLineWidth += newString.length(); LOOP: for (int i = newString.length() - 1; i >= 0; --i) { switch (newString.charAt(i)) { case '\n': case '\r': { currentLineWidth = newString.length() - i; break LOOP; } } } } super.add(newString); add("]]>"); }
public void endEmptyElement() { removeLast(); add("/>"); if (!isMixed) { addLine(); } lastElementIsStart = false; }
public void endEmptyElement() { removeLast(); 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(" "); } } } }