Java XMLStreamWriter CreateTable(XMLStreamWriter serializer)

Here you can find the source of CreateTable(XMLStreamWriter serializer)

Description

Create Table

License

Open Source License

Declaration

public static XMLStreamWriter CreateTable(XMLStreamWriter serializer) throws XMLStreamException 

Method Source Code

//package com.java2s;
//   Licensed under the Apache License, Version 2.0 (the "License"); you may

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

public class Main {
    public static XMLStreamWriter CreateTable(XMLStreamWriter serializer) throws XMLStreamException {
        return CreateTable(serializer, "", "");
    }// w ww.j a va  2s  . c  om

    public static XMLStreamWriter CreateTable(XMLStreamWriter serializer, String width, String height)
            throws XMLStreamException {
        serializer.writeStartElement("table");
        serializer.writeAttribute("cellpadding", "1");
        serializer.writeAttribute("cellspacing", "1");
        if (width != null && width != "")
            serializer.writeAttribute("width", width);
        if (height != null && height != "")
            serializer.writeAttribute("height", height);
        return serializer;
    }
}

Related

  1. closeQuietly(XMLStreamWriter c)
  2. copy(Reader reader, XMLStreamWriter xmlStreamWriter)
  3. CreateColumn(XMLStreamWriter serializer, String w, String h)
  4. CreateSimpleImage(XMLStreamWriter serializer, URL url, int w, int h)
  5. CreateSimpleTagAndContent(XMLStreamWriter serializer, String tag, String content)
  6. createXMLStreamWriter(StringWriter outWriter)
  7. exportCoordinateList(XMLStreamWriter writer, List coordinates, String separator)
  8. getXMLStreamWriter(final Writer writer)
  9. isEntityExpansionLimitException(XMLStreamException e)