diff --git a/src/fr/devinsy/util/xml/XMLWriter.java b/src/fr/devinsy/util/xml/XMLWriter.java index ee66dc3..5cd6d5f 100644 --- a/src/fr/devinsy/util/xml/XMLWriter.java +++ b/src/fr/devinsy/util/xml/XMLWriter.java @@ -92,12 +92,12 @@ public class XMLWriter */ public void writeComment(final String comment) { - out.print(""); + this.out.print(" -->"); } /** @@ -105,10 +105,10 @@ public class XMLWriter */ public void writeEmptyTag(final String label, final String... attributes) { - out.print("<"); - out.print(label); + this.out.print("<"); + this.out.print(label); writeTagAttributes(attributes); - out.print("/>"); + this.out.print("/>"); } /** @@ -116,9 +116,9 @@ public class XMLWriter */ public void writeEndTag(final String label) { - out.print(""); + this.out.print(""); } /** @@ -126,10 +126,21 @@ public class XMLWriter */ public void writeStartTag(final String label, final String... attributes) { - out.print("<"); - out.print(label); + this.out.print("<"); + this.out.print(label); writeTagAttributes(attributes); - out.print(">"); + this.out.print(">"); + } + + /** + * + */ + public void writeTag(final String label, final boolean content, final String... attributes) + { + + writeStartTag(label, attributes); + writeTagContent(String.valueOf(content)); + writeEndTag(label); } /** @@ -171,11 +182,11 @@ public class XMLWriter { for (int count = 0; count < attributes.length; count += 2) { - out.print(" "); - out.print(attributes[count]); - out.print("=\""); - out.print(attributes[count + 1]); - out.print("\""); + this.out.print(" "); + this.out.print(attributes[count]); + this.out.print("=\""); + this.out.print(attributes[count + 1]); + this.out.print("\""); } } } @@ -194,22 +205,22 @@ public class XMLWriter switch (car) { case '<': - out.print("<"); + this.out.print("<"); break; case '>': - out.print(">"); + this.out.print(">"); break; case '&': - out.print("&"); + this.out.print("&"); break; case '"': - out.print("""); + this.out.print("""); break; case '\'': - out.print("'"); + this.out.print("'"); break; default: - out.print(car); + this.out.print(car); } } } @@ -221,24 +232,24 @@ public class XMLWriter { // - out.print(""); + this.out.print(" ?>"); } }