60 * optionally indented if an indent step is provided (by default, there 61 * is no indentation). If an element contains other elements, the end 62 * tag will also appear on a new line with leading indentation. Consider, 63 * for example, the following code:</p> 64 * 65 * <pre> 66 * DataWriter w = new DataWriter(); 67 * 68 * w.setIndentStep(2); 69 * w.startDocument(); 70 * w.startElement("Person"); 71 * w.dataElement("name", "Jane Smith"); 72 * w.dataElement("date-of-birth", "1965-05-23"); 73 * w.dataElement("citizenship", "US"); 74 * w.endElement("Person"); 75 * w.endDocument(); 76 * </pre> 77 * 78 * <p>This code will produce the following document:</p> 79 * 80 * <pre> 81 * <?xml version="1.0" standalone="yes"?> 82 * 83 * <Person> 84 * <name>Jane Smith</name> 85 * <date-of-birth>1965-05-23</date-of-birth> 86 * <citizenship>US</citizenship> 87 * </Person> 88 * </pre> 89 * 90 * <p>This class inherits from {@link XMLWriter}, 91 * and provides all of the same support for Namespaces.</p> 92 * 93 * @since 1.0 94 * @author David Megginson, david@megginson.com 95 * @version 0.2 96 * @see XMLWriter 97 */ 98 public class DataWriter extends XMLWriter 99 { 100 101 102 103 //////////////////////////////////////////////////////////////////// 104 // Constructors. 105 //////////////////////////////////////////////////////////////////// 106 107 108 /** | 60 * optionally indented if an indent step is provided (by default, there 61 * is no indentation). If an element contains other elements, the end 62 * tag will also appear on a new line with leading indentation. Consider, 63 * for example, the following code:</p> 64 * 65 * <pre> 66 * DataWriter w = new DataWriter(); 67 * 68 * w.setIndentStep(2); 69 * w.startDocument(); 70 * w.startElement("Person"); 71 * w.dataElement("name", "Jane Smith"); 72 * w.dataElement("date-of-birth", "1965-05-23"); 73 * w.dataElement("citizenship", "US"); 74 * w.endElement("Person"); 75 * w.endDocument(); 76 * </pre> 77 * 78 * <p>This code will produce the following document:</p> 79 * 80 * <pre>{@code 81 * <?xml version="1.0" standalone="yes"?> 82 * 83 * <Person> 84 * <name>Jane Smith</name> 85 * <date-of-birth>1965-05-23</date-of-birth> 86 * <citizenship>US</citizenship> 87 * </Person> 88 * }</pre> 89 * 90 * <p>This class inherits from {@link XMLWriter}, 91 * and provides all of the same support for Namespaces.</p> 92 * 93 * @since 1.0 94 * @author David Megginson, david@megginson.com 95 * @version 0.2 96 * @see XMLWriter 97 */ 98 public class DataWriter extends XMLWriter 99 { 100 101 102 103 //////////////////////////////////////////////////////////////////// 104 // Constructors. 105 //////////////////////////////////////////////////////////////////// 106 107 108 /** |